fix: improve message

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
This commit is contained in:
Carlos Alexandro Becker 2024-07-09 10:17:18 -03:00
parent d89d79a00c
commit f44e5b5f5c
No known key found for this signature in database

View file

@ -396,7 +396,7 @@ func tryLoadConfigFromDefaultPlaces() {
scope := gap.NewScope(gap.User, "glow") scope := gap.NewScope(gap.User, "glow")
dirs, err := scope.ConfigDirs() dirs, err := scope.ConfigDirs()
if err != nil { if err != nil {
fmt.Println("Could not load find config directory.") fmt.Println("Could not load find configuration directory.")
os.Exit(1) os.Exit(1)
} }
@ -425,10 +425,11 @@ func tryLoadConfigFromDefaultPlaces() {
if used := viper.ConfigFileUsed(); used != "" { if used := viper.ConfigFileUsed(); used != "" {
log.Debug("Using configuration file", "path", viper.ConfigFileUsed()) log.Debug("Using configuration file", "path", viper.ConfigFileUsed())
} else { return
}
if err := ensureConfigFile(); err != nil { if err := ensureConfigFile(); err != nil {
fmt.Println("Could not create default config.") fmt.Println("Could not create default configuration.")
os.Exit(1) os.Exit(1)
} }
} }
}