mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-28 01:41:48 -06:00
command: Fix 0.12upgrade stub
This commit is contained in:
parent
f86fb6161b
commit
5e2b11657e
@ -1,6 +1,9 @@
|
|||||||
package command
|
package command
|
||||||
|
|
||||||
import "fmt"
|
import (
|
||||||
|
"fmt"
|
||||||
|
"strings"
|
||||||
|
)
|
||||||
|
|
||||||
type ZeroTwelveUpgradeCommand struct {
|
type ZeroTwelveUpgradeCommand struct {
|
||||||
Meta
|
Meta
|
||||||
@ -13,3 +16,18 @@ v0.12 to upgrade your configuration syntax before upgrading to the current
|
|||||||
version.`))
|
version.`))
|
||||||
return 0
|
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) {
|
"0.12upgrade": func() (cli.Command, error) {
|
||||||
return &command.ZeroThirteenUpgradeCommand{
|
return &command.ZeroTwelveUpgradeCommand{
|
||||||
Meta: meta,
|
Meta: meta,
|
||||||
}, nil
|
}, nil
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user