From aa5dc453eef670e6bb6bee3c326cb850aa35d329 Mon Sep 17 00:00:00 2001 From: James Nugent Date: Wed, 22 Jun 2016 11:46:38 +0300 Subject: [PATCH] cli: Fix registration of `state mv`. Fixes #7259. --- command/state_mv.go | 2 +- commands.go | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/command/state_mv.go b/command/state_mv.go index 25da66862..7ca5fdd4b 100644 --- a/command/state_mv.go +++ b/command/state_mv.go @@ -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") diff --git a/commands.go b/commands.go index a070ff0d7..e33e55540 100644 --- a/commands.go +++ b/commands.go @@ -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,