fix(desktop): stop AppImage updates hanging on quit and deleting the app (#1485)
* fix(desktop): disable auto-install on quit for AppImage only
electron-updater's AppImageUpdater.doInstall() uses execFileSync with APPIMAGE_EXIT_AFTER_INSTALL when autoInstallOnAppQuit is true. For AppImages, this blocks the old process indefinitely because the new process has no installer step to exit from — the mv already completed the install.
Scoped to AppImage only (process.platform === 'linux' && process.env.APPIMAGE). .deb/.rpm/Windows/macOS keep auto-install-on-quit working as before.
* fix(desktop): keep AppImage filename stable across updates
electron-updater renames a versioned AppImage to a new path on update and
unlinks the old one. That orphaned the previous binary, broke desktop
shortcuts, and dangled the ~/.local/bin/paseo CLI symlink, which points at
$APPIMAGE. Dropping ${version} from the AppImage artifactName makes the
updater overwrite the file in place instead; deb/rpm keep versioned names.
Also documents why AppImage must not auto-install on quit (the blocking
execFileSync gated on APPIMAGE_EXIT_AFTER_INSTALL, honored only by
AppImageLauncher) and extracts that gate into a unit-tested helper.
---------
Co-authored-by: Mohamed Boudra <boudra.moha@gmail.com>
This commit is contained in:
@@ -52,6 +52,13 @@ linux:
|
||||
- deb
|
||||
- rpm
|
||||
- tar.gz
|
||||
appImage:
|
||||
# Keep the AppImage filename stable across versions (no ${version}) so
|
||||
# electron-updater overwrites the file in place instead of renaming it to a new
|
||||
# versioned path. A rename orphans the old binary, breaks desktop shortcuts, and
|
||||
# dangles the ~/.local/bin/paseo CLI symlink, which points at $APPIMAGE. The
|
||||
# version stays discoverable via the release tag and the in-app version.
|
||||
artifactName: "Paseo-${arch}.${ext}"
|
||||
win:
|
||||
artifactName: "Paseo-Setup-${version}-${arch}.${ext}"
|
||||
icon: assets/icon.ico
|
||||
|
||||
Reference in New Issue
Block a user