From 35a0784eb4cffc2fcbf33ec58fefbacf8e8e5125 Mon Sep 17 00:00:00 2001 From: RASTIQ Date: Wed, 10 Jul 2024 16:02:40 +0000 Subject: [PATCH] fix(rpm-updater): stop uninstalling app before update (#8311) Stop uninstalling an app before it updates, as dnf, yum, and zypper all support updating an app from a .rpm, and because app.getName() returns the product name of the app instead of its package name. (Fixes #8305) --- .changeset/real-ducks-repair.md | 5 +++++ packages/electron-updater/src/RpmUpdater.ts | 11 +---------- 2 files changed, 6 insertions(+), 10 deletions(-) create mode 100644 .changeset/real-ducks-repair.md diff --git a/.changeset/real-ducks-repair.md b/.changeset/real-ducks-repair.md new file mode 100644 index 00000000000..9d7d972cdb5 --- /dev/null +++ b/.changeset/real-ducks-repair.md @@ -0,0 +1,5 @@ +--- +"electron-updater": patch +--- + +fix(rpm-updater): stop uninstalling app before update diff --git a/packages/electron-updater/src/RpmUpdater.ts b/packages/electron-updater/src/RpmUpdater.ts index 3b7f9f9cea2..15cc98007b5 100644 --- a/packages/electron-updater/src/RpmUpdater.ts +++ b/packages/electron-updater/src/RpmUpdater.ts @@ -36,18 +36,9 @@ export class RpmUpdater extends BaseUpdater { let cmd: string[] if (!packageManager) { const packageManager = this.spawnSyncLog("which dnf || which yum") - cmd = [packageManager, "-y", "remove", `'${this.app.name}'`, ";", packageManager, "-y", "install", upgradePath] + cmd = [packageManager, "-y", "install", upgradePath] } else { cmd = [ - packageManager, - "remove", - "-y", - `'${this.app.name}'`, - ";", - packageManager, - "clean", - "--all", - ";", packageManager, "--no-refresh", "install",