diff --git a/cli/main.go b/cli/main.go index 10e50f13..04e92fca 100644 --- a/cli/main.go +++ b/cli/main.go @@ -150,7 +150,7 @@ func main() { currentContext, err := determineCurrentContext(opts.Context, configDir) if err != nil { - fatal(errors.New("unable to determine current context")) + fatal(errors.Wrap(err, "unable to determine current context")) } s, err := store.New(store.WithRoot(configDir)) diff --git a/config/config.go b/config/config.go index 49058a7d..f55a6f7f 100644 --- a/config/config.go +++ b/config/config.go @@ -99,7 +99,7 @@ func loadFile(path string, dest interface{}) error { return errors.Wrap(err, "unable to read config file") } err = json.Unmarshal(data, dest) - return errors.Wrap(err, "unable to unmarshal config") + return errors.Wrap(err, "unable to unmarshal config file "+path) } func configFilePath(dir string) string {