Error out if env version is chaos-y and --chaos not provided

Re #554
This commit is contained in:
3wc
2025-09-02 15:34:58 -04:00
parent 4547cf2579
commit 3606349a4a

View File

@ -108,10 +108,13 @@ checkout as-is. Recipe commit hashes are also supported as values for
}
if !internal.Chaos {
_, err = app.Recipe.EnsureVersion(toDeployVersion)
isChaos, err := app.Recipe.EnsureVersion(toDeployVersion)
if err != nil {
log.Fatal(i18n.G("ensure recipe: %s", err))
}
if isChaos {
log.Fatal(i18n.G("version '%s' appears to be a chaos commit, but --chaos/-C was not provided", toDeployVersion))
}
}
if err := lint.LintForErrors(app.Recipe); err != nil {