From 590c83c134a5eba337751d1d8650c8072e565a35 Mon Sep 17 00:00:00 2001 From: Chris Cummer Date: Thu, 19 Apr 2018 06:01:16 -0700 Subject: [PATCH] Display the error if the config file cannot be loaded --- wtf/config_files.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wtf/config_files.go b/wtf/config_files.go index fd260aa2..2500204c 100644 --- a/wtf/config_files.go +++ b/wtf/config_files.go @@ -27,7 +27,8 @@ func LoadConfigFile(filePath string) *config.Config { cfg, err := config.ParseYamlFile(absPath) if err != nil { - fmt.Println("\n\n\033[1m ERROR:\033[0m Could not load '\033[0;33mconfig.yml\033[0m'.\n Please add a \033[0;33mconfig.yml\033[0m file to your \033[0;33m~/.wtf\033[0m directory.\n See \033[1;34mhttps://github.com/senorprogrammer/wtf\033[0m for details.") + fmt.Println("\n\n\033[1m ERROR:\033[0m Could not load '\033[0;33mconfig.yml\033[0m'.\n Please add a \033[0;33mconfig.yml\033[0m file to your \033[0;33m~/.wtf\033[0m directory.\n See \033[1;34mhttps://github.com/senorprogrammer/wtf\033[0m for details.\n") + fmt.Printf(" %s\n", err.Error()) os.Exit(1) }