command/remote-config: make the error message nicer for remote init

/cc @sethvargo - based on UX issues you ran into yesterday
pull/1307/head
Mitchell Hashimoto 11 years ago
parent 26fa9b6daa
commit 2796f83950

@ -177,7 +177,12 @@ func (c *RemoteConfigCommand) validateRemoteConfig() error {
conf := c.remoteConf
_, err := remote.NewClient(conf.Type, conf.Config)
if err != nil {
c.Ui.Error(fmt.Sprintf("%s", err))
c.Ui.Error(fmt.Sprintf(
"%s\n\n"+
"If the error message above mentions requiring or modifying configuration\n" +
"options, these are set using the `-backend-config` flag. Example:\n" +
'-backend-config="name=foo" to set the `name` configuration',
err))
}
return err
}

Loading…
Cancel
Save