From 389d3ee7bd7532c3411aafa759eb37c672e7f7f9 Mon Sep 17 00:00:00 2001 From: liu-hm19 Date: Thu, 6 Jun 2024 16:57:01 +0800 Subject: [PATCH] fix: set the release phase as failed when exit apply prompt (#1148) --- pkg/cmd/apply/apply.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/cmd/apply/apply.go b/pkg/cmd/apply/apply.go index fafde1a6..8db1049d 100644 --- a/pkg/cmd/apply/apply.go +++ b/pkg/cmd/apply/apply.go @@ -823,7 +823,7 @@ func prompt(ui *terminal.UI) (string, error) { WithDefaultOption("details"). // To gracefully exit if interrupted by SIGINT or SIGTERM. WithOnInterruptFunc(func() { - release.UpdateReleasePhase(rel, apiv1.ReleasePhaseSucceeded, relLock) + release.UpdateReleasePhase(rel, apiv1.ReleasePhaseFailed, relLock) release.UpdateApplyRelease(storage, rel, false, relLock) os.Exit(1) }).