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:
parent
23ef0e3247
commit
45a9edb763
|
@ -24,7 +24,7 @@ func (c *StateMvCommand) Run(args []string) int {
|
||||||
var meta1, meta2 Meta
|
var meta1, meta2 Meta
|
||||||
cmdFlags := c.Meta.flagSet("state mv")
|
cmdFlags := c.Meta.flagSet("state mv")
|
||||||
cmdFlags.StringVar(&meta1.backupPath, "backup", "-", "backup")
|
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.backupPath, "backup-out", "-", "backup")
|
||||||
cmdFlags.StringVar(&meta2.statePath, "state-out", "", "path")
|
cmdFlags.StringVar(&meta2.statePath, "state-out", "", "path")
|
||||||
if err := cmdFlags.Parse(args); err != nil {
|
if err := cmdFlags.Parse(args); err != nil {
|
||||||
|
|
|
@ -21,7 +21,7 @@ func (c *StateRmCommand) Run(args []string) int {
|
||||||
|
|
||||||
cmdFlags := c.Meta.flagSet("state show")
|
cmdFlags := c.Meta.flagSet("state show")
|
||||||
cmdFlags.StringVar(&c.Meta.backupPath, "backup", "-", "backup")
|
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 {
|
if err := cmdFlags.Parse(args); err != nil {
|
||||||
return cli.RunResultHelp
|
return cli.RunResultHelp
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue