Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

misc(scripts): fix unbound variable in open-devtools #11845

Merged
merged 2 commits into from
Dec 22, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 $*