mirror of https://github.com/docker/compose.git
Merge pull request #211 from docker/wrap_context_error
Wrap error cause so that we can understand why the cli cannot determine current context
This commit is contained in:
commit
bc1b2b778a
|
@ -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))
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue