command: Fix 0.12upgrade stub

pull/25103/head
Alisdair McDiarmid 6 years ago
parent f86fb6161b
commit 5e2b11657e

@ -1,6 +1,9 @@
package command
import "fmt"
import (
"fmt"
"strings"
)
type ZeroTwelveUpgradeCommand struct {
Meta
@ -13,3 +16,18 @@ v0.12 to upgrade your configuration syntax before upgrading to the current
version.`))
return 0
}
func (c *ZeroTwelveUpgradeCommand) Help() string {
helpText := `
Usage: terraform 0.12upgrade
The 0.12upgrade command is deprecated. You must run this command with
Terraform v0.12 to upgrade your configuration syntax before upgrading to
the current version.
`
return strings.TrimSpace(helpText)
}
func (c *ZeroTwelveUpgradeCommand) Synopsis() string {
return "Rewrites pre-0.12 module source code for v0.12"
}

@ -311,7 +311,7 @@ func initCommands(config *cliconfig.Config, services *disco.Disco, providerSrc g
//-----------------------------------------------------------
"0.12upgrade": func() (cli.Command, error) {
return &command.ZeroThirteenUpgradeCommand{
return &command.ZeroTwelveUpgradeCommand{
Meta: meta,
}, nil
},

Loading…
Cancel
Save