From 4e677fb0962db038686066dab096a78567b3bc17 Mon Sep 17 00:00:00 2001 From: Pedro Enrique Date: Mon, 2 Jun 2025 21:55:01 +0200 Subject: [PATCH] fix: prevent terminal cursor from disappearing after breaking change error by returning error instead of os.Exit(1) in checkForBreakingChanges --- internal/bundler/upgrade.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/bundler/upgrade.go b/internal/bundler/upgrade.go index c60f690c..cc470b26 100644 --- a/internal/bundler/upgrade.go +++ b/internal/bundler/upgrade.go @@ -240,16 +240,16 @@ func checkForBreakingChanges(ctx BundleContext, language string, runtime string) if err := change.Callback(ctx); err != nil { return err } - os.Exit(1) + return fmt.Errorf("migration performed, please re-run the command") } else { return fmt.Errorf("migration required") } } else { if tui.HasTTY && !ctx.DevMode { tui.ShowBanner(change.Title, change.Message, true) - os.Exit(1) + return fmt.Errorf("breaking change migration required") } else { - ctx.Logger.Fatal(change.Message) + return fmt.Errorf("%s", change.Message) } } }