From 6b3dcb01aad8a2428f9ea6953bc1bea1faf4dea4 Mon Sep 17 00:00:00 2001 From: Andrey Lushnikov Date: Wed, 6 Jan 2021 14:13:01 +0300 Subject: [PATCH] chore: fix randomly crashing build-playwright-driver.sh (#4909) Some googling showed that CI systems might not be capable of handling too much STDOUT that `tar -v` produces. ([source](https://stackoverflow.com/questions/37540792/jenkins-script-tar-write-error)). This patch: - removes verbose flag from tar to reduce output - sets `+x` to get some logging for the script - silences zip output --- utils/build/build-playwright-driver.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/utils/build/build-playwright-driver.sh b/utils/build/build-playwright-driver.sh index 6a21f24482..e1830ee8be 100755 --- a/utils/build/build-playwright-driver.sh +++ b/utils/build/build-playwright-driver.sh @@ -1,6 +1,6 @@ #!/bin/bash set -e -set +x +set -x trap "cd $(pwd -P)" EXIT SCRIPT_PATH="$(cd "$(dirname "$0")" ; pwd -P)" @@ -25,18 +25,18 @@ function build { cd ${SCRIPT_PATH} mkdir -p ./output/playwright-${SUFFIX} - tar -xzvf ./output/playwright.tgz -C ./output/playwright-${SUFFIX}/ + tar -xzf ./output/playwright.tgz -C ./output/playwright-${SUFFIX}/ curl ${NODE_URL} -o ./output/${NODE_DIR}.${ARCHIVE} NPM_PATH="" if [[ "${ARCHIVE}" == "zip" ]]; then cd ./output - unzip ./${NODE_DIR}.zip + unzip -q ./${NODE_DIR}.zip cd .. cp ./output/${NODE_DIR}/node.exe ./output/playwright-${SUFFIX}/ NPM_PATH="node_modules/npm/bin/npm-cli.js" elif [[ "${ARCHIVE}" == "tar.gz" ]]; then - tar -xzvf ./output/${NODE_DIR}.tar.gz -C ./output/ + tar -xzf ./output/${NODE_DIR}.tar.gz -C ./output/ cp ./output/${NODE_DIR}/bin/node ./output/playwright-${SUFFIX}/ NPM_PATH="lib/node_modules/npm/bin/npm-cli.js" else @@ -60,7 +60,7 @@ function build { echo "Unsupported RUN_DRIVER ${RUN_DRIVER}" exit 1 fi - zip -r ../playwright-${PACKAGE_VERSION}-${SUFFIX}.zip . + zip -q -r ../playwright-${PACKAGE_VERSION}-${SUFFIX}.zip . } build "node-v12.20.1-darwin-x64" "mac" "tar.gz" "run-driver-posix.sh"