File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -77,18 +77,20 @@ VERSION="${VERSION#v}"
7777if [[ -z " $VERSION " ]]; then
7878 tag=" $(
7979 curl -fsSL " https://api.github.com/repos/${REPO} /releases/latest" \
80- | sed -nE ' s/^[[:space:]]*"tag_name":[[:space:]]*"([^"]+)".*$/\\ 1/p' \
80+ | sed -nE ' s/^[[:space:]]*"tag_name":[[:space:]]*"([^"]+)".*$/\1/p' \
8181 | head -n 1
8282 ) "
8383 if [[ -z " $tag " ]]; then
8484 echo " failed to resolve latest version from GitHub for ${REPO} " >&2
8585 exit 1
8686 fi
8787 VERSION=" ${tag# v} "
88+ else
89+ tag=" v${VERSION} "
8890fi
8991
9092asset=" nytgames-cli_${VERSION} _${os} _${arch} .tar.gz"
91- base_url=" https://github.com/${REPO} /releases/download/v ${VERSION }"
93+ base_url=" https://github.com/${REPO} /releases/download/${tag }"
9294url=" ${base_url} /${asset} "
9395checksums_url=" ${base_url} /checksums.txt"
9496
@@ -138,4 +140,3 @@ if ! command -v "${BIN_NAME}" >/dev/null 2>&1; then
138140 echo " Note: ${INSTALL_DIR} is not on your PATH. Add it, e.g.:" >&2
139141 echo " export PATH=\" ${INSTALL_DIR} :\$ PATH\" " >&2
140142fi
141-
You can’t perform that action at this time.
0 commit comments