Print error if .lumerc cannot be found
This commit is contained in:
parent
8935a6a91b
commit
a8bf5a7b55
@ -17,6 +17,11 @@ func main() {
|
|||||||
var config lumecmd.Config
|
var config lumecmd.Config
|
||||||
|
|
||||||
configPath := getConfigPath()
|
configPath := getConfigPath()
|
||||||
|
if configPath == "" {
|
||||||
|
fmt.Println("fatal: ~/.lumerc was not found")
|
||||||
|
os.Exit(1)
|
||||||
|
}
|
||||||
|
|
||||||
if _, err := toml.DecodeFile(configPath, &config); err != nil {
|
if _, err := toml.DecodeFile(configPath, &config); err != nil {
|
||||||
fmt.Printf("fatal: failed to parse %s\n", configPath)
|
fmt.Printf("fatal: failed to parse %s\n", configPath)
|
||||||
fmt.Println(err)
|
fmt.Println(err)
|
||||||
|
Loading…
Reference in New Issue
Block a user