Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
fix: bail early when installing channels on non-ubuntu (#11617)
Andrey Lushnikov3c27badd31ae
diff --git a/packages/playwright-core/bin/reinstall_chrome_beta_linux.sh b/packages/playwright-core/bin/reinstall_chrome_beta_linux.shindex 63e9253dc0..2be2d65026 100755--- a/packages/playwright-core/bin/reinstall_chrome_beta_linux.sh+++ b/packages/playwright-core/bin/reinstall_chrome_beta_linux.sh@@ -7,6 +7,17 @@ if [[ $(arch) == "aarch64" ]]; thenexit 1fi+if [[ ! -f "/etc/os-release" ]]; then+ echo "ERROR: cannot install on unknown linux distribution (/etc/os-release is missing)"+ exit 1+fi++ID=$(bash -c 'source /etc/os-release && echo $ID')+if [[ "${ID}" != "ubuntu" ]]; then+ echo "ERROR: cannot install on $ID distribution - only Ubuntu is supported"+ exit 1+fi+# 1. make sure to remove old beta if any.if dpkg --get-selections | grep -q "^google-chrome-beta[[:space:]]*install$" >/dev/null; thenapt-get remove -y google-chrome-betadiff --git a/packages/playwright-core/bin/reinstall_chrome_stable_linux.sh b/packages/playwright-core/bin/reinstall_chrome_stable_linux.shindex 57269bd5fe..bcb2275f37 100755--- a/packages/playwright-core/bin/reinstall_chrome_stable_linux.sh+++ b/packages/playwright-core/bin/reinstall_chrome_stable_linux.sh@@ -7,6 +7,17 @@ if [[ $(arch) == "aarch64" ]]; thenexit 1fi+if [[ ! -f "/etc/os-release" ]]; then+ echo "ERROR: cannot install on unknown linux distribution (/etc/os-release is missing)"+ exit 1+fi++ID=$(bash -c 'source /etc/os-release && echo $ID')+if [[ "${ID}" != "ubuntu" ]]; then+ echo "ERROR: cannot install on $ID distribution - only Ubuntu is supported"+ exit 1+fi+# 1. make sure to remove old stable if any.if dpkg --get-selections | grep -q "^google-chrome[[:space:]]*install$" >/dev/null; thenapt-get remove -y google-chromediff --git a/packages/playwright-core/bin/reinstall_msedge_beta_linux.sh b/packages/playwright-core/bin/reinstall_msedge_beta_linux.shindex ff19e52173..637b9cd7ad 100755--- a/packages/playwright-core/bin/reinstall_msedge_beta_linux.sh+++ b/packages/playwright-core/bin/reinstall_msedge_beta_linux.sh@@ -8,6 +8,17 @@ if [[ $(arch) == "aarch64" ]]; thenexit 1fi+if [[ ! -f "/etc/os-release" ]]; then+ echo "ERROR: cannot install on unknown linux distribution (/etc/os-release is missing)"+ exit 1+fi++ID=$(bash -c 'source /etc/os-release && echo $ID')+if [[ "${ID}" != "ubuntu" ]]; then+ echo "ERROR: cannot install on $ID distribution - only Ubuntu is supported"+ exit 1+fi+# 1. make sure to remove old beta if any.if dpkg --get-selections | grep -q "^microsoft-edge-beta[[:space:]]*install$" >/dev/null; thenapt-get remove -y microsoft-edge-betadiff --git a/packages/playwright-core/bin/reinstall_msedge_dev_linux.sh b/packages/playwright-core/bin/reinstall_msedge_dev_linux.shindex 9c3447fe69..55962fe6b6 100755--- a/packages/playwright-core/bin/reinstall_msedge_dev_linux.sh+++ b/packages/playwright-core/bin/reinstall_msedge_dev_linux.sh@@ -8,6 +8,17 @@ if [[ $(arch) == "aarch64" ]]; thenexit 1fi+if [[ ! -f "/etc/os-release" ]]; then+ echo "ERROR: cannot install on unknown linux distribution (/etc/os-release is missing)"+ exit 1+fi++ID=$(bash -c 'source /etc/os-release && echo $ID')+if [[ "${ID}" != "ubuntu" ]]; then+ echo "ERROR: cannot install on $ID distribution - only Ubuntu is supported"+ exit 1+fi+# 1. make sure to remove old dev if any.if dpkg --get-selections | grep -q "^microsoft-edge-dev[[:space:]]*install$" >/dev/null; thenapt-get remove -y microsoft-edge-devdiff --git a/packages/playwright-core/bin/reinstall_msedge_stable_linux.sh b/packages/playwright-core/bin/reinstall_msedge_stable_linux.shindex 19dc354b26..5bde389b60 100755--- a/packages/playwright-core/bin/reinstall_msedge_stable_linux.sh+++ b/packages/playwright-core/bin/reinstall_msedge_stable_linux.sh@@ -8,6 +8,17 @@ if [[ $(arch) == "aarch64" ]]; thenexit 1fi+if [[ ! -f "/etc/os-release" ]]; then+ echo "ERROR: cannot install on unknown linux distribution (/etc/os-release is missing)"+ exit 1+fi++ID=$(bash -c 'source /etc/os-release && echo $ID')+if [[ "${ID}" != "ubuntu" ]]; then+ echo "ERROR: cannot install on $ID distribution - only Ubuntu is supported"+ exit 1+fi+# 1. make sure to remove old stable if any.if dpkg --get-selections | grep -q "^microsoft-edge-stable[[:space:]]*install$" >/dev/null; thenapt-get remove -y microsoft-edge-stable