Merge pull request #7266 from hashicorp/fix-state-mv
cli: Fix registration of `state mv`.
This commit is contained in:
commit
82a7ad8ed2
|
@ -19,7 +19,7 @@ func (c *StateMvCommand) Run(args []string) int {
|
||||||
|
|
||||||
// We create two metas to track the two states
|
// We create two metas to track the two states
|
||||||
var meta1, meta2 Meta
|
var meta1, meta2 Meta
|
||||||
cmdFlags := c.Meta.flagSet("state show")
|
cmdFlags := c.Meta.flagSet("state mv")
|
||||||
cmdFlags.StringVar(&meta1.stateOutPath, "backup", "", "backup")
|
cmdFlags.StringVar(&meta1.stateOutPath, "backup", "", "backup")
|
||||||
cmdFlags.StringVar(&meta1.statePath, "state", DefaultStateFilename, "path")
|
cmdFlags.StringVar(&meta1.statePath, "state", DefaultStateFilename, "path")
|
||||||
cmdFlags.StringVar(&meta2.stateOutPath, "backup-out", "", "backup")
|
cmdFlags.StringVar(&meta2.stateOutPath, "backup-out", "", "backup")
|
||||||
|
|
|
@ -171,6 +171,12 @@ func init() {
|
||||||
}, nil
|
}, nil
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"state mv": func() (cli.Command, error) {
|
||||||
|
return &command.StateMvCommand{
|
||||||
|
Meta: meta,
|
||||||
|
}, nil
|
||||||
|
},
|
||||||
|
|
||||||
"state show": func() (cli.Command, error) {
|
"state show": func() (cli.Command, error) {
|
||||||
return &command.StateShowCommand{
|
return &command.StateShowCommand{
|
||||||
Meta: meta,
|
Meta: meta,
|
||||||
|
|
Loading…
Reference in New Issue