Skip to content

Commit 35a0784

Browse files
authored
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)
1 parent dd145d6 commit 35a0784

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

.changeset/real-ducks-repair.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"electron-updater": patch
3+
---
4+
5+
fix(rpm-updater): stop uninstalling app before update

packages/electron-updater/src/RpmUpdater.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,9 @@ export class RpmUpdater extends BaseUpdater {
3636
let cmd: string[]
3737
if (!packageManager) {
3838
const packageManager = this.spawnSyncLog("which dnf || which yum")
39-
cmd = [packageManager, "-y", "remove", `'${this.app.name}'`, ";", packageManager, "-y", "install", upgradePath]
39+
cmd = [packageManager, "-y", "install", upgradePath]
4040
} else {
4141
cmd = [
42-
packageManager,
43-
"remove",
44-
"-y",
45-
`'${this.app.name}'`,
46-
";",
47-
packageManager,
48-
"clean",
49-
"--all",
50-
";",
5142
packageManager,
5243
"--no-refresh",
5344
"install",

0 commit comments

Comments
 (0)