fix: return error, not log.Fatal

See #582
This commit is contained in:
2025-08-18 08:00:50 +02:00
committed by decentral1se
parent feadfca0d6
commit 5f4b5e0fad

View File

@ -40,14 +40,14 @@ func (r Recipe) Ensure(ctx EnsureContext) error {
if !ctx.Offline {
if err := r.EnsureUpToDate(); err != nil {
log.Fatal(err)
return err
}
}
if r.EnvVersion != "" && !ctx.IgnoreEnvVersion {
log.Debugf("ensuring env version %s", r.EnvVersion)
if strings.Contains(r.EnvVersion, "+U") {
log.Fatalf("can not redeploy chaos version (%s) without --chaos", r.EnvVersion)
return fmt.Errorf("can not redeploy chaos version (%s) without --chaos", r.EnvVersion)
}
if _, err := r.EnsureVersion(r.EnvVersion); err != nil {