Skip to content

Commit 9a1101f

Browse files
committed
fix: handle error when removing old app during update process
1 parent 7d0259a commit 9a1101f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

updater/apply_darwin.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,11 @@ func apply(targetPath string, current releaser.Version, client *releaser.Client,
139139

140140
// Remove old app
141141
slog.Info("Removing old app", "to", oldAppPath)
142-
_ = oldAppPath.RemoveAll()
142+
err = oldAppPath.RemoveAll()
143+
// TODO: added only to debug why it is not able to remove the old app, remove later
144+
if err != nil {
145+
return "", fmt.Errorf("could not remove old app: %w", err)
146+
}
143147

144148
slog.Info("Returning updated app", "path", currentAppPath)
145149

0 commit comments

Comments
 (0)