Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Commit

Permalink
Fail build if CHROMEDRIVER_VERSION is set, or Chrome is already found…
Browse files Browse the repository at this point in the history
… in the path
  • Loading branch information
mars committed Jan 31, 2024
1 parent 5a3f90a commit 4aeb03d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions bin/compile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,16 @@ INSTALL_DIR="$BUILD_DIR/.chrome-for-testing"
BIN_DIR="$INSTALL_DIR/bin"
mkdir -p "$BIN_DIR"

# Detect if the old config var is still used
if [ -f "$ENV_DIR/CHROMEDRIVER_VERSION" ]; then
error "This buildpack no longer supports CHROMEDRIVER_VERSION config var and must be removed to continue, because this buildpack now installs compatible versions of Chrome & Chromedriver. GOOGLE_CHROME_CHANNEL can be used to set Stable (default), Beta, Dev, or Canary."
fi

# Detect if Chrome is already installed
if which chrome; then
error "Chrome is already installed. This buildpack now install a compatible version of Chrome. Please, remove the other Chrome installation."
fi

# Detect requested channel or default to stable
if [ -f "$ENV_DIR/GOOGLE_CHROME_CHANNEL" ]; then
channel=$(cat "$ENV_DIR/GOOGLE_CHROME_CHANNEL")
Expand Down

0 comments on commit 4aeb03d

Please sign in to comment.