cli: Make state commands check required version (#30511)

This commit is contained in:
gabriel376
2022-03-31 14:42:42 -03:00
committed by GitHub
parent 6ce6955a4f
commit f5a8608989
16 changed files with 403 additions and 28 deletions

View File

@@ -38,6 +38,11 @@ func (c *StatePushCommand) Run(args []string) int {
return cli.RunResultHelp
}
if diags := c.Meta.checkRequiredVersion(); diags != nil {
c.showDiagnostics(diags)
return 1
}
// Determine our reader for the input state. This is the filepath
// or stdin if "-" is given.
var r io.Reader = os.Stdin