Skip to content

Commit

Permalink
feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
connorjclark committed Sep 17, 2020
1 parent a9f4ee0 commit a4f81cf
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions lighthouse-core/scripts/open-devtools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,24 @@ set -euo pipefail
# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
##

if [[ -z $CHROME_PATH ]]
then
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
LH_ROOT="$SCRIPT_DIR/../.."
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
echo 'Must set $CHROME_PATH'
exit 1
fi

export DEVTOOLS_PATH=${DEVTOOLS_PATH:-"$HOME/src/devtools/devtools-frontend"}
echo "CHROME_PATH: $CHROME_PATH"
echo "DEVTOOLS_PATH: $DEVTOOLS_PATH"

if [ ! -d $DEVTOOLS_PATH ]; then
echo "No devtools found at $DEVTOOLS_PATH. Have you run 'yarn test-devtools' yet?"
exit 1
fi

yarn build-devtools
yarn devtools "$DEVTOOLS_PATH"
Expand Down

0 comments on commit a4f81cf

Please sign in to comment.