Skip to content

Commit

Permalink
Both variables for token
Browse files Browse the repository at this point in the history
  • Loading branch information
dex4er committed Oct 2, 2023
1 parent 1a1f7fe commit 04a765b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/install
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function install() {
local download_filename="infracost-${platform}-${arch}.tar.gz"
local checksum_filename="${download_filename}.sha256"

if [[ -n ${GITHUB_TOKEN-} ]]; then
if [[ -n ${GITHUB_TOKEN-} ]] || [[ -n ${GITHUB_API_TOKEN-} ]]; then
local asset_url
asset_url="https://api.github.com/repos/${repo}/releases/tags/${prefix}${version}"
download_url=$(gh_curl -H "Accept: application/vnd.github.v3.raw" "${asset_url}" | jq -r ".assets | map(select(.name == \"${download_filename}\"))[0].url")
Expand Down

0 comments on commit 04a765b

Please sign in to comment.