From c9afe538ded41e432ccc12d8e2cfaf4f5f4e1f9f Mon Sep 17 00:00:00 2001 From: Terry McGuinness Date: Thu, 26 Dec 2024 16:17:06 -0600 Subject: [PATCH] updated check for GitHub CLI --- ci/scripts/utils/launch_java_agent.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/scripts/utils/launch_java_agent.sh b/ci/scripts/utils/launch_java_agent.sh index 6761639f1f..e307323036 100755 --- a/ci/scripts/utils/launch_java_agent.sh +++ b/ci/scripts/utils/launch_java_agent.sh @@ -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") +[[ -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