File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ API_RESPONSE="$(curl -sf ${GITHUB_TOKEN:+-H "Authorization: token ${GITHUB_TOKEN
2020}
2121
2222# Extract the download URL for this platform
23- DOWNLOAD_URL=" $( echo " ${API_RESPONSE} " | grep " browser_download_url.*${OS} .*${ARCH} " | cut -d ' "' -f 4) "
23+ DOWNLOAD_URL=" $( echo " ${API_RESPONSE} " | grep " browser_download_url.*${OS} .*${ARCH} " | cut -d ' "' -f 4 || true ) "
2424if [ -z " ${DOWNLOAD_URL} " ]; then
2525 echo " Error: Could not find release for ${OS} ${ARCH} " >&2
2626 echo " GitHub API response (truncated): ${API_RESPONSE: 0: 200} " >&2
Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ if echo "$VERSION_RESPONSE" | grep -q "API rate limit exceeded"; then
122122 echo -e " ${YELLOW} If you are using a VPN, try turning it off and running this script again.${NC} "
123123 echo -e " ${YELLOW} See: https://docs.github.com/rest/overview/resources-in-the-rest-api#rate-limiting${NC} "
124124else
125- COMMIT_SHA=$( echo " $VERSION_RESPONSE " | grep ' "sha"' | head -1 | sed ' s/.*"sha": *"\([^"]*\)".*/\1/' )
125+ COMMIT_SHA=$( echo " $VERSION_RESPONSE " | grep ' "sha"' | head -1 | sed ' s/.*"sha": *"\([^"]*\)".*/\1/' || true )
126126 if [[ -n " $COMMIT_SHA " ]]; then
127127 for dir in " ${INSTALL_DIRS[@]} " ; do
128128 printf ' branch=%s\ncommit=%s\n' " $BRANCH " " $COMMIT_SHA " > " $dir /.version"
You can’t perform that action at this time.
0 commit comments