Skip to content

fix(updater): don't throw when determining which package manager to use #9113

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 30 commits into from
May 27, 2025

Conversation

mmaietta
Copy link
Collaborator

@mmaietta mmaietta commented May 17, 2025

Fixes: #9099

  • Refactors linux-based functions to LinuxUpdater abstract class.
  • Extracts all sudo-based logic to common function in LinuxUpdater. Adds logic flow to handle CI envs (sudo for CLI env) and running without elevation when process is already root
  • Uses command -v instead of which to determine which package manager and sudo to use
  • Adds additional support for rpm yum and apt for RpmUpdater
  • Adds apt support for DebUpdater
  • Adds Dockerfiles for fedora, bookworm, and archlinux to test individual installation flows (as root user, but at least we have better coverage than before)

Copy link

changeset-bot bot commented May 17, 2025

🦋 Changeset detected

Latest commit: edb5b72

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
electron-updater Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@mmaietta mmaietta marked this pull request as ready for review May 17, 2025 21:09
mmaietta and others added 9 commits May 17, 2025 14:17
Deb: Search for dpkg first
RPM: Search for zypper first as safest installation method. Add `--nogpgcheck` to dnf and yum. fallback to `rpm`
# Conflicts:
#	.github/workflows/test.yaml
#	package.json
#	test/src/updater/Dockerfile-archlinux
#	test/src/updater/Dockerfile-rpm
#	test/src/updater/linuxUpdaterTest.ts
#	test/src/updater/test-specific-platforms.sh
mmaietta and others added 3 commits May 26, 2025 22:32
…ing or encoding

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@mmaietta mmaietta merged commit 8ba9be4 into master May 27, 2025
22 checks passed
@mmaietta mmaietta deleted the fix/updater-which-package-manager branch May 27, 2025 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RPM upgrades broken when zypper is not installed
1 participant