mirror of
https://github.com/charmbracelet/glow
synced 2024-11-10 06:04:18 +00:00
fix: improve message
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
This commit is contained in:
parent
d89d79a00c
commit
f44e5b5f5c
1 changed files with 7 additions and 6 deletions
13
main.go
13
main.go
|
@ -396,7 +396,7 @@ func tryLoadConfigFromDefaultPlaces() {
|
|||
scope := gap.NewScope(gap.User, "glow")
|
||||
dirs, err := scope.ConfigDirs()
|
||||
if err != nil {
|
||||
fmt.Println("Could not load find config directory.")
|
||||
fmt.Println("Could not load find configuration directory.")
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
|
@ -425,10 +425,11 @@ func tryLoadConfigFromDefaultPlaces() {
|
|||
|
||||
if used := viper.ConfigFileUsed(); used != "" {
|
||||
log.Debug("Using configuration file", "path", viper.ConfigFileUsed())
|
||||
} else {
|
||||
if err := ensureConfigFile(); err != nil {
|
||||
fmt.Println("Could not create default config.")
|
||||
os.Exit(1)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
if err := ensureConfigFile(); err != nil {
|
||||
fmt.Println("Could not create default configuration.")
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue