cli: Fix registration of `state mv`.

Fixes #7259.
This commit is contained in:
James Nugent 2016-06-22 11:46:38 +03:00
parent c5ec77eab5
commit aa5dc453ee
2 changed files with 7 additions and 1 deletions

View File

@ -19,7 +19,7 @@ func (c *StateMvCommand) Run(args []string) int {
// We create two metas to track the two states
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.statePath, "state", DefaultStateFilename, "path")
cmdFlags.StringVar(&meta2.stateOutPath, "backup-out", "", "backup")

View File

@ -171,6 +171,12 @@ func init() {
}, nil
},
"state mv": func() (cli.Command, error) {
return &command.StateMvCommand{
Meta: meta,
}, nil
},
"state show": func() (cli.Command, error) {
return &command.StateShowCommand{
Meta: meta,