Skip to content

Commit 1fc10fe

Browse files
authored
fix: make sure chrome for testing is installed and linked properly (#141)
* fix: make sure chrome for testing is installed and linked properly * re-add apt-get section of chrome for testing dependencies but only in the linux section
1 parent f96fd56 commit 1fc10fe

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/scripts/install_chrome_for_testing.sh

100644100755
Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@ if uname -a | grep Darwin >/dev/null 2>&1; then
2323

2424
$SUDO curl -s -o chrome-for-testing.zip "https://storage.googleapis.com/chrome-for-testing-public/$target_version/mac-arm64/chrome-mac-arm64.zip"
2525
if [ -s "chrome-for-testing.zip" ]; then
26-
$SUDO unzip chrome-for-testing.zip >/dev/null 2>&1
26+
$SUDO unzip chrome-for-testing.zip >/dev/null
27+
$SUDO rm chrome-for-testing.zip
28+
$SUDO mv ./chrome-mac-arm64 /opt/chrome-for-testing
29+
# leveraging /opt instead of /Applications/Google Chrome for Testing.app/Contents/MacOS/Google Chrome for Testing as this should be temporary
30+
$SUDO ln -fs /opt/chrome-for-testing/chrome /usr/local/bin/chrome
2731
else
2832
echo "Version $target_version doesn't exist"
2933
#exit 1
@@ -45,14 +49,18 @@ elif command -v apt >/dev/null 2>&1; then
4549
$SUDO curl -s -o chrome-for-testing.zip "https://storage.googleapis.com/chrome-for-testing-public/$target_version/linux64/chrome-linux64.zip"
4650
if [ -s "chrome-for-testing.zip" ]; then
4751
$SUDO unzip chrome-for-testing.zip >/dev/null 2>&1
52+
$SUDO rm chrome-for-testing.zip
53+
$SUDO mv ./chrome-linux64 /opt/chrome-for-testing
54+
$SUDO ln -fs /opt/chrome-for-testing/chrome /usr/local/bin/chrome
4855
else
4956
echo "Version $target_version doesn't exist"
5057
exit 1
5158
fi
59+
5260
$SUDO apt-get update
5361
while read -r pkg; do
5462
$SUDO apt-get satisfy -y --no-install-recommends "${pkg}";
55-
done < chrome-linux64/deb.deps;
63+
done < /opt/chrome-for-testing/deb.deps;
5664

5765
if [ "$ORB_PARAM_INSTALL_CHROMEDRIVER" = true ] ; then
5866
$SUDO curl -s -o chrome-for-testing-driver.zip "https://storage.googleapis.com/chrome-for-testing-public/$target_version/linux64/chromedriver-linux64.zip"

0 commit comments

Comments
 (0)