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

Handle circleci command being missing in chrome install #118

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
9 changes: 8 additions & 1 deletion src/scripts/install-chrome.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@
if [[ $EUID == 0 ]]; then export SUDO=""; else export SUDO="sudo"; fi

# process ORB_PARAM_CHROME_VERSION
PROCESSED_CHROME_VERSION=$(circleci env subst "$ORB_PARAM_CHROME_VERSION")
if command -v circleci &>/dev/null; then
# CircleCI is installed, proceed with substitution
PROCESSED_CHROME_VERSION=$(circleci env subst "$ORB_PARAM_CHROME_VERSION")
else
# CircleCI is not installed, fallback to using the environment variable as-is
echo "CircleCI CLI is not installed. Relying on the environment variable ORB_PARAM_CHROME_VERSION to be set manually."
PROCESSED_CHROME_VERSION=${ORB_PARAM_CHROME_VERSION:-latest} # Default to "latest" if the variable is unset
fi

# installation check
if uname -a | grep Darwin >/dev/null 2>&1; then
Expand Down