feat: allow running driver with preinstalled node.js (#16518)

This commit is contained in:
Yury Semikhatsky 2022-08-15 09:27:35 -07:00 committed by GitHub
parent 09e6bb9c0f
commit ed1e5efc5c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -1,3 +1,6 @@
#!/bin/sh
SCRIPT_PATH="$(cd "$(dirname "$0")" ; pwd -P)"
"$SCRIPT_PATH/node" "$SCRIPT_PATH/package/lib/cli/cli.js" "$@"
if [[ -z "$PLAYWRIGHT_NODEJS_PATH" ]]; then
PLAYWRIGHT_NODEJS_PATH="$SCRIPT_PATH/node"
fi
"$PLAYWRIGHT_NODEJS_PATH" "$SCRIPT_PATH/package/lib/cli/cli.js" "$@"

View File

@ -1,3 +1,4 @@
@ECHO OFF
SETLOCAL
"%~dp0\node.exe" "%~dp0\package\lib\cli\cli.js" %*
IF %PLAYWRIGHT_NODEJS_PATH%x == x SET PLAYWRIGHT_NODEJS_PATH="%~dp0\node.exe"
"%PLAYWRIGHT_NODEJS_PATH%" "%~dp0\package\lib\cli\cli.js" %*