Clearer error message on config file read error

This commit is contained in:
Shlomi Noach 2017-09-10 08:20:01 +03:00
parent 3fc3446561
commit 6362dbe51a

View File

@ -700,7 +700,7 @@ func (this *MigrationContext) ReadConfigFile() error {
gcfg.RelaxedParserMode = true
gcfgscanner.RelaxedScannerMode = true
if err := gcfg.ReadFileInto(&this.config, this.ConfigFile); err != nil {
return err
return fmt.Errorf("Error reading config file %s. Details: %s", this.ConfigFile, err.Error())
}
// We accept user & password in the form "${SOME_ENV_VARIABLE}" in which case we pull