From 84c1be50546444344d08732fe27a4fa63ed30093 Mon Sep 17 00:00:00 2001 From: Ryan Cavicchioni Date: Fri, 15 Jan 2021 22:24:39 -0600 Subject: [PATCH] Print error if .lumerc cannot be found --- cmd/lume/main.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmd/lume/main.go b/cmd/lume/main.go index c97bf20..fae0c5f 100644 --- a/cmd/lume/main.go +++ b/cmd/lume/main.go @@ -17,6 +17,11 @@ func main() { var config lumecmd.Config configPath := getConfigPath() + if configPath == "" { + fmt.Println("fatal: ~/.lumerc was not found") + os.Exit(1) + } + if _, err := toml.DecodeFile(configPath, &config); err != nil { fmt.Printf("fatal: failed to parse %s\n", configPath) fmt.Println(err)