make state mv and rm work with remote states

The default value for the -state flag was overriding the location of any
remote state.
This commit is contained in:
James Bardin 2017-07-25 17:28:59 -04:00
parent 23ef0e3247
commit 45a9edb763
2 changed files with 2 additions and 2 deletions

View File

@ -24,7 +24,7 @@ func (c *StateMvCommand) Run(args []string) int {
var meta1, meta2 Meta
cmdFlags := c.Meta.flagSet("state mv")
cmdFlags.StringVar(&meta1.backupPath, "backup", "-", "backup")
cmdFlags.StringVar(&meta1.statePath, "state", DefaultStateFilename, "path")
cmdFlags.StringVar(&meta1.statePath, "state", "", "path")
cmdFlags.StringVar(&meta2.backupPath, "backup-out", "-", "backup")
cmdFlags.StringVar(&meta2.statePath, "state-out", "", "path")
if err := cmdFlags.Parse(args); err != nil {

View File

@ -21,7 +21,7 @@ func (c *StateRmCommand) Run(args []string) int {
cmdFlags := c.Meta.flagSet("state show")
cmdFlags.StringVar(&c.Meta.backupPath, "backup", "-", "backup")
cmdFlags.StringVar(&c.Meta.statePath, "state", DefaultStateFilename, "path")
cmdFlags.StringVar(&c.Meta.statePath, "state", "", "path")
if err := cmdFlags.Parse(args); err != nil {
return cli.RunResultHelp
}