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
chore: relax checks when installing channels on unsupported platforms (#33436)
Yury Semikhatsky513c57536ad5
diff --git a/packages/playwright-core/bin/reinstall_chrome_beta_linux.sh b/packages/playwright-core/bin/reinstall_chrome_beta_linux.shindex 14c684599c..0451bda3ef 100755--- a/packages/playwright-core/bin/reinstall_chrome_beta_linux.sh+++ b/packages/playwright-core/bin/reinstall_chrome_beta_linux.sh@@ -7,15 +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+if [ -z "$PLAYWRIGHT_HOST_PLATFORM_OVERRIDE" ]; then+ 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" && "${ID}" != "debian" ]]; then- echo "ERROR: cannot install on $ID distribution - only Ubuntu and Debian are supported"- exit 1+ ID=$(bash -c 'source /etc/os-release && echo $ID')+ if [[ "${ID}" != "ubuntu" && "${ID}" != "debian" ]]; then+ echo "ERROR: cannot install on $ID distribution - only Ubuntu and Debian are supported"+ exit 1+ fifi# 1. make sure to remove old beta if any.diff --git a/packages/playwright-core/bin/reinstall_chrome_stable_linux.sh b/packages/playwright-core/bin/reinstall_chrome_stable_linux.shindex 28a19699df..78f1d41397 100755--- a/packages/playwright-core/bin/reinstall_chrome_stable_linux.sh+++ b/packages/playwright-core/bin/reinstall_chrome_stable_linux.sh@@ -7,15 +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+if [ -z "$PLAYWRIGHT_HOST_PLATFORM_OVERRIDE" ]; then+ 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" && "${ID}" != "debian" ]]; then- echo "ERROR: cannot install on $ID distribution - only Ubuntu and Debian are supported"- exit 1+ ID=$(bash -c 'source /etc/os-release && echo $ID')+ if [[ "${ID}" != "ubuntu" && "${ID}" != "debian" ]]; then+ echo "ERROR: cannot install on $ID distribution - only Ubuntu and Debian are supported"+ exit 1+ fifi# 1. make sure to remove old stable if any.diff --git a/packages/playwright-core/bin/reinstall_msedge_beta_linux.sh b/packages/playwright-core/bin/reinstall_msedge_beta_linux.shindex ff8c3c9f89..ececd05ace 100755--- a/packages/playwright-core/bin/reinstall_msedge_beta_linux.sh+++ b/packages/playwright-core/bin/reinstall_msedge_beta_linux.sh@@ -8,15 +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" && "${ID}" != "debian" ]]; then- echo "ERROR: cannot install on $ID distribution - only Ubuntu and Debian are supported"- exit 1+if [ -z "$PLAYWRIGHT_HOST_PLATFORM_OVERRIDE" ]; then+ 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" && "${ID}" != "debian" ]]; then+ echo "ERROR: cannot install on $ID distribution - only Ubuntu and Debian are supported"+ exit 1+ fifi# 1. make sure to remove old beta if any.diff --git a/packages/playwright-core/bin/reinstall_msedge_dev_linux.sh b/packages/playwright-core/bin/reinstall_msedge_dev_linux.shindex 6a026722b1..6ab84c3100 100755--- a/packages/playwright-core/bin/reinstall_msedge_dev_linux.sh+++ b/packages/playwright-core/bin/reinstall_msedge_dev_linux.sh@@ -8,15 +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" && "${ID}" != "debian" ]]; then- echo "ERROR: cannot install on $ID distribution - only Ubuntu and Debian are supported"- exit 1+if [ -z "$PLAYWRIGHT_HOST_PLATFORM_OVERRIDE" ]; then+ 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" && "${ID}" != "debian" ]]; then+ echo "ERROR: cannot install on $ID distribution - only Ubuntu and Debian are supported"+ exit 1+ fifi# 1. make sure to remove old dev if any.diff --git a/packages/playwright-core/bin/reinstall_msedge_stable_linux.sh b/packages/playwright-core/bin/reinstall_msedge_stable_linux.shindex 1f2c9bf382..e66f85bbba 100755--- a/packages/playwright-core/bin/reinstall_msedge_stable_linux.sh+++ b/packages/playwright-core/bin/reinstall_msedge_stable_linux.sh@@ -8,15 +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" && "${ID}" != "debian" ]]; then- echo "ERROR: cannot install on $ID distribution - only Ubuntu and Debian are supported"- exit 1+if [ -z "$PLAYWRIGHT_HOST_PLATFORM_OVERRIDE" ]; then+ 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" && "${ID}" != "debian" ]]; then+ echo "ERROR: cannot install on $ID distribution - only Ubuntu and Debian are supported"+ exit 1+ fifi# 1. make sure to remove old stable if any.