don't print help for state loading errors
These already include detailed messages, and it's not a usage issue, it's a config or file location issue.
This commit is contained in:
parent
2e7c8ab76a
commit
5b4ae36cb0
|
@ -40,7 +40,7 @@ func (c *StateMvCommand) Run(args []string) int {
|
|||
stateFrom, err := c.State()
|
||||
if err != nil {
|
||||
c.Ui.Error(fmt.Sprintf(errStateLoadingState, err))
|
||||
return cli.RunResultHelp
|
||||
return 1
|
||||
}
|
||||
|
||||
if err := stateFrom.RefreshState(); err != nil {
|
||||
|
@ -64,7 +64,7 @@ func (c *StateMvCommand) Run(args []string) int {
|
|||
stateTo, err = c.State()
|
||||
if err != nil {
|
||||
c.Ui.Error(fmt.Sprintf(errStateLoadingState, err))
|
||||
return cli.RunResultHelp
|
||||
return 1
|
||||
}
|
||||
|
||||
if err := stateTo.RefreshState(); err != nil {
|
||||
|
|
|
@ -34,7 +34,7 @@ func (c *StateRmCommand) Run(args []string) int {
|
|||
state, err := c.State()
|
||||
if err != nil {
|
||||
c.Ui.Error(fmt.Sprintf(errStateLoadingState, err))
|
||||
return cli.RunResultHelp
|
||||
return 1
|
||||
}
|
||||
if err := state.RefreshState(); err != nil {
|
||||
c.Ui.Error(fmt.Sprintf("Failed to load state: %s", err))
|
||||
|
|
Loading…
Reference in New Issue