Skip to content

Commit

Permalink
Only use preview plans for --yes in experimental mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Frassle committed Nov 23, 2022
1 parent 8279e95 commit 2a9d8b7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/backend/apply.go
Expand Up @@ -122,6 +122,11 @@ func PreviewThenPrompt(ctx context.Context, kind apitype.UpdateKind, stack Stack
// If there are no changes, or we're auto-approving or just previewing, we can skip the confirmation prompt.
if op.Opts.AutoApprove || kind == apitype.PreviewUpdate {
close(eventsChannel)
// If we're running in experimental mode then return the plan generated, else discard it. The user may
// be explicitly setting a plan but that's handled higher up the call stack.
if !op.Opts.Engine.Experimental {
plan = nil
}
return plan, changes, nil
}

Expand Down

0 comments on commit 2a9d8b7

Please sign in to comment.