Skip to content

Commit

Permalink
Merge pull request #928 from djmarcin/fix-custom-url
Browse files Browse the repository at this point in the history
Fix NODE_BINARY_URL extraction
  • Loading branch information
joshwlewis authored Aug 12, 2021
2 parents 9937029 + 8eaa64d commit 39e4b17
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
## v186 (2021-08-11)
- Refactor $WEB_CONCURRENCY logic ([#931](https://github.com/heroku/heroku-buildpack-nodejs/pull/931))
- Fix broken tests, update node and yarn inventory, update shunit2 ([#934](https://github.com/heroku/heroku-buildpack-nodejs/pull/934))
- Fix NODE_BINARY_URL extraction prefix stripping logic ([#928](https://github.com/heroku/heroku-buildpack-nodejs/pull/928))

## v185 (2021-06-03)
- Drop Heroku-16 from CI test matrix ([#920](https://github.com/heroku/heroku-buildpack-nodejs/pull/920))
Expand Down
8 changes: 2 additions & 6 deletions lib/binaries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,7 @@ install_yarn() {
install_nodejs() {
local version=${1:-14.x}
local dir="${2:?}"
local code os cpu resolve_result

os=$(get_os)
cpu=$(get_cpu)
local code resolve_result

if [[ -n "$NODE_BINARY_URL" ]]; then
url="$NODE_BINARY_URL"
Expand All @@ -115,9 +112,8 @@ install_nodejs() {
if [ "$code" != "200" ]; then
echo "Unable to download node: $code" && false
fi
tar xzf /tmp/node.tar.gz -C /tmp
rm -rf "${dir:?}"/*
mv /tmp/node-v"$number"-"$os"-"$cpu"/* "$dir"
tar xzf /tmp/node.tar.gz --strip-components 1 -C "$dir"
chmod +x "$dir"/bin/*
}

Expand Down

0 comments on commit 39e4b17

Please sign in to comment.