diff --git a/entrypoint.sh b/entrypoint.sh index bc99822..f9449e8 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -39,8 +39,12 @@ if [[ "${INPUT_CURL_INSECURE}" == 'true' ]]; then INSECURE_OPTION="--insecure" fi -curl -fsSL --retry 5 --keepalive-time 2 ${INSECURE_OPTION} "${DOWNLOAD_URL_PREFIX}/${CLIENT_BINARY}" -o "${TARGET}" -chmod +x "${TARGET}" +if [[ ! -x "${TARGET}" ]]; then + curl -fsSL --retry 5 --keepalive-time 2 ${INSECURE_OPTION} "${DOWNLOAD_URL_PREFIX}/${CLIENT_BINARY}" -o "${TARGET}" + chmod +x "${TARGET}" +else + echo "Binary ${CLIENT_BINARY} already exists and is executable, skipping download." +fi echo "======= CLI Version Information =======" "${TARGET}" --version