Skip to content

Commit

Permalink
updated check for GitHub CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
Terry McGuinness committed Dec 26, 2024
1 parent 8b36793 commit c9afe53
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ci/scripts/utils/launch_java_agent.sh
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ JAVA="${JAVA_HOME}/bin/java"
echo "JAVA VERSION: "
${JAVA} -version

export GH=$(which gh || echo "${HOME}/bin/gh")
[[ -f "${GH}" ]] || echo "gh is not installed in ${HOME}/bin"
GH=$(command -v gh || echo "~/bin/gh")

Check warning

Code scanning / shellcheck

Tilde does not expand in quotes. Use $HOME. Warning

Tilde does not expand in quotes. Use $HOME.
[[ -f "${GH}" ]] || echo "ERROR: GitHub CLI (gh) not found. (exiting with error)"; exit 1
${GH} --version

check_mark=$("${GH}" auth status -t 2>&1 | grep "Token:" | awk '{print $1}') || true
Expand Down

0 comments on commit c9afe53

Please sign in to comment.