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

@@ -23,6 +23,11 @@ func (c *StatePullCommand) Run(args []string) int {
return 1
}
if diags := c.Meta.checkRequiredVersion(); diags != nil {
c.showDiagnostics(diags)
return 1
}
// Load the backend
b, backendDiags := c.Backend(nil)
if backendDiags.HasErrors() {