Skip to content

Commit

Permalink
misc(scripts): fix unbound variable in open-devtools (#11845)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirish committed Mar 23, 2021
1 parent 6216c77 commit 9351b66
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lighthouse-core/scripts/open-devtools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ TEST_DIR="$LH_ROOT/.tmp/chromium-web-tests"
DEFAULT_DEVTOOLS_PATH="$TEST_DIR/devtools/devtools-frontend"
DEVTOOLS_PATH=${DEVTOOLS_PATH:-"$DEFAULT_DEVTOOLS_PATH"}

if [[ -z $CHROME_PATH ]]; then
if [ -z "${CHROME_PATH:-}" ]; then
echo 'Must set $CHROME_PATH'
exit 1
fi

echo "CHROME_PATH: $CHROME_PATH"
echo "DEVTOOLS_PATH: $DEVTOOLS_PATH"

if [ ! -d $DEVTOOLS_PATH ]; then
if [ ! -d "$DEVTOOLS_PATH" ]; then
echo "No devtools found at $DEVTOOLS_PATH. Have you run 'yarn test-devtools' yet?"
exit 1
fi
Expand All @@ -43,4 +43,5 @@ cd "$DEVTOOLS_PATH"
gn gen out/Default
gclient sync
autoninja -C out/Default
"$CHROME_PATH" --custom-devtools-frontend=file://$DEVTOOLS_PATH/out/Default/resources/inspector

"$CHROME_PATH" --custom-devtools-frontend=file://"$DEVTOOLS_PATH"/out/Default/resources/inspector $*

0 comments on commit 9351b66

Please sign in to comment.