Skip to content

Commit 78ed8cc

Browse files
Check that the new executable exists and is in the right path before proceding with the update
1 parent 38e50a9 commit 78ed8cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

updater/updater_darwin.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ func checkForUpdates(currentVersion string, updateURL string, cmdName string) (s
143143

144144
// Install new app
145145
logrus.WithField("from", tmpAppPath).WithField("to", currentAppPath).Info("Copying updated app")
146-
if err := tmpAppPath.CopyDirTo(currentAppPath); err != nil {
146+
if err := tmpAppPath.CopyDirTo(currentAppPath); err != nil || !paths.New(executablePath).Exist() {
147147
// Try rollback changes
148148
_ = currentAppPath.RemoveAll()
149149
_ = oldAppPath.Rename(currentAppPath)

0 commit comments

Comments
 (0)