feat(installer): support installing Chrome and Edge on RPM-based Linux#41443
Open
alpham8 wants to merge 2 commits into
Open
feat(installer): support installing Chrome and Edge on RPM-based Linux#41443alpham8 wants to merge 2 commits into
alpham8 wants to merge 2 commits into
Conversation
Detect the distribution from /etc/os-release and branch the Chrome install between apt/.deb (Ubuntu/Debian) and rpm-based package managers: zypper (openSUSE/SLES/SLED) and dnf or yum (Fedora, RHEL, CentOS, Rocky, AlmaLinux, Amazon Linux, Oracle Linux, ...). Google's signing key is imported so the package manager trusts the downloaded rpm. For distributions without an official Google Chrome package (Arch, CachyOS, Alpine, Gentoo, NixOS, ...) print actionable guidance pointing to the native package or Playwright's bundled Chromium, instead of a generic "unsupported distribution" error. The Ubuntu/Debian apt path and PLAYWRIGHT_HOST_PLATFORM_OVERRIDE behaviour are unchanged.
Mirror the Chrome install scripts: detect the distribution from
/etc/os-release and, on rpm-based systems (openSUSE via zypper, Fedora
and RHEL via dnf or yum), register Microsoft's Edge rpm repository at
packages.microsoft.com and install microsoft-edge-{stable,beta,dev}
from there. On distributions without an official Edge package, print a
short hint (AUR on Arch, otherwise Playwright's bundled Chromium).
The Ubuntu/Debian apt path and PLAYWRIGHT_HOST_PLATFORM_OVERRIDE
behaviour are unchanged.
Author
@microsoft-github-policy-service agree [company="{Wunner Software}"] |
Author
|
@microsoft-github-policy-service agree |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
npx playwright install chrome/install msedgepreviously failed on everynon-Debian distribution with "cannot install on … distribution — only Ubuntu
and Debian are supported".
reinstall_chrome_*andreinstall_msedge_*scripts now detect thedistribution from
/etc/os-releaseand install through the matching packagemanager:
apt/.deb— Debian, Ubuntu (unchanged)zypper/.rpm— openSUSE, SLESdnf(fallbackyum) /.rpm— Fedora, RHEL, CentOS, Rocky, AlmaLinux, Amazon Linuxinstalls
microsoft-edge-{stable,beta,dev}; Chrome imports Google's signingkey and installs the official
google-chrome-{stable,beta}RPM.now print a clear, actionable hint (e.g. the AUR package name, or "use the
bundled Chromium") instead of a hard failure.
Notes
linux_signing_key.pub;packages.microsoft.com/yumrepos/edge+microsoft.asc).sudowrapper, so itcannot be exercised non-interactively in CI; manual verification was done on
openSUSE Tumbleweed.