diff --git a/packages/playwright-core/bin/reinstall_chrome_beta_linux.sh b/packages/playwright-core/bin/reinstall_chrome_beta_linux.sh index 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" ]]; then exit 1 fi -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 + fi fi # 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.sh index 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" ]]; then exit 1 fi -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 + fi fi # 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.sh index 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" ]]; then exit 1 fi -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 + fi fi # 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.sh index 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" ]]; then exit 1 fi -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 + fi fi # 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.sh index 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" ]]; then exit 1 fi -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 + fi fi # 1. make sure to remove old stable if any.