From 6cbbc4325bbcb037f00cbaf9f71f0525e755fc48 Mon Sep 17 00:00:00 2001 From: Markus Vahlenkamp Date: Tue, 5 Dec 2023 09:13:45 +0100 Subject: [PATCH] Prevent cleanup on CTRL-C (#1769) * Prevent cleanup on CTRL-C * adjusting log message * Update cmd/deploy.go Co-authored-by: Roman Dodin --------- Co-authored-by: Roman Dodin --- cmd/deploy.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/deploy.go b/cmd/deploy.go index 9735a07be..ac2615d56 100644 --- a/cmd/deploy.go +++ b/cmd/deploy.go @@ -382,11 +382,11 @@ func setupCTRLCHandler(cancel context.CancelFunc) { signal.Notify(sig, os.Interrupt, syscall.SIGTERM) go func() { <-sig - log.Errorf("Caught CTRL-C. Stopping deployment and cleaning up!") + log.Errorf("Caught CTRL-C. Stopping deployment!") cancel() - // when interrupted, destroy the interrupted lab deployment with cleanup - cleanup = true + // when interrupted, destroy the interrupted lab deployment + cleanup = false if err := destroyFn(destroyCmd, []string{}); err != nil { log.Errorf("Failed to destroy lab: %v", err) }