Merge pull request #494 from github/cfg-read-error

Clearer error message on config file read error
This commit is contained in:
Shlomi Noach 2017-09-10 19:54:13 +03:00 committed by GitHub
commit a46d5b54ea

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