Skip to content

Commit bba3ad6

Browse files
committed
mv fix
1 parent df21ace commit bba3ad6

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

apps/remix-ide-e2e/chrome-driver.sh

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,22 @@ curl -sS -o "$ZIP_PATH" "$CHROMEDRIVER_DOWNLOAD_URL"
7777
unzip -o "$ZIP_PATH" -d "$INSTALL_DIR"
7878

7979
# Move the extracted chromedriver binary to the root of INSTALL_DIR
80-
EXTRACTED_DIR=$(find "$INSTALL_DIR" -mindepth 1 -maxdepth 1 -type d | head -n1)
81-
if [ -f "$EXTRACTED_DIR/chromedriver" ]; then
82-
mv "$EXTRACTED_DIR/chromedriver" "$INSTALL_DIR/chromedriver"
80+
EXTRACTED_DIR="${INSTALL_DIR}/chromedriver-${PLATFORM}"
81+
ALT_DIR="${INSTALL_DIR}/chromedriver_${PLATFORM}"
82+
83+
if [ -f "${EXTRACTED_DIR}/chromedriver" ]; then
84+
mv "${EXTRACTED_DIR}/chromedriver" "$INSTALL_DIR/chromedriver"
85+
elif [ -f "${ALT_DIR}/chromedriver" ]; then
86+
mv "${ALT_DIR}/chromedriver" "$INSTALL_DIR/chromedriver"
8387
else
84-
echo "Error: chromedriver binary not found in $EXTRACTED_DIR"
85-
exit 1
88+
# Fallback: try to find chromedriver file inside any subdir
89+
FOUND=$(find "$INSTALL_DIR" -type f -name chromedriver | head -n1)
90+
if [ -n "$FOUND" ]; then
91+
mv "$FOUND" "$INSTALL_DIR/chromedriver"
92+
else
93+
echo "Error: chromedriver binary not found"
94+
exit 1
95+
fi
8696
fi
8797

8898
chmod +x "$INSTALL_DIR/chromedriver"

0 commit comments

Comments
 (0)