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

/cc @sethvargo - based on UX issues you ran into yesterday
This commit is contained in:
Mitchell Hashimoto 2015-03-25 15:23:04 -07:00
parent 26fa9b6daa
commit 2796f83950
1 changed files with 6 additions and 1 deletions

View File

@ -177,7 +177,12 @@ func (c *RemoteConfigCommand) validateRemoteConfig() error {
conf := c.remoteConf conf := c.remoteConf
_, err := remote.NewClient(conf.Type, conf.Config) _, err := remote.NewClient(conf.Type, conf.Config)
if err != nil { 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 return err
} }