From 5b4ae36cb07afb4abd0e32158aecca813da3dca9 Mon Sep 17 00:00:00 2001 From: James Bardin Date: Thu, 27 Jul 2017 14:10:52 -0400 Subject: [PATCH] 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. --- command/state_mv.go | 4 ++-- command/state_rm.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/command/state_mv.go b/command/state_mv.go index ed4622f52..32b2c0087 100644 --- a/command/state_mv.go +++ b/command/state_mv.go @@ -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 { diff --git a/command/state_rm.go b/command/state_rm.go index 9d7f2742c..a2ffdf1b8 100644 --- a/command/state_rm.go +++ b/command/state_rm.go @@ -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))