From 9a1101ff616f88bf3bc2d6f87705c2ac019d23a5 Mon Sep 17 00:00:00 2001 From: dido Date: Wed, 22 Oct 2025 15:09:45 +0200 Subject: [PATCH] fix: handle error when removing old app during update process --- updater/apply_darwin.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/updater/apply_darwin.go b/updater/apply_darwin.go index 5b31cbb..c92c617 100644 --- a/updater/apply_darwin.go +++ b/updater/apply_darwin.go @@ -139,7 +139,11 @@ func apply(targetPath string, current releaser.Version, client *releaser.Client, // Remove old app slog.Info("Removing old app", "to", oldAppPath) - _ = oldAppPath.RemoveAll() + err = oldAppPath.RemoveAll() + // TODO: added only to debug why it is not able to remove the old app, remove later + if err != nil { + return "", fmt.Errorf("could not remove old app: %w", err) + } slog.Info("Returning updated app", "path", currentAppPath)