You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Show original error on bootstrap failed download
Current
```
curl --fail --retry 3 --retry-connrefused --connect-timeout "3" --silent --location -o "/tmp/ruby.tgz" "https://heroku-buildpack-ruby.s3.us-east-1.amazonaws.com/heroku-20/ruby-3.3.9.tgz"; echo "Done $?"
# => Done 22
```
After
```
curl --fail --show-error --retry 3 --retry-connrefused --connect-timeout "3" --silent --location -o "/tmp/ruby.tgz" "https://heroku-buildpack-ruby.s3.us-east-1.amazonaws.com/heroku-20/ruby-3.3.9.tgz"; echo "Done $?"
# => curl: (22) The requested URL returned error: 404
# => Done 22
```
Ref heroku#1628
* Don't silently ignore bash failures
This output reported in heroku#1628 is confusing.
```
remote: /tmp/buildpackLSI7t/bin/compile: line 35: Failed to download a Ruby executable for bootstrapping!
remote:
remote: This is most likely a temporary internal error. If the problem
remote: persists, make sure that you are not running a custom or forked
remote: version of the Heroku Ruby buildpack which may need updating.
remote:
remote: url: https://heroku-buildpack-ruby.s3.us-east-1.amazonaws.com/heroku-20/ruby-3.3.9.tgz
remote: /tmp/tmp.PDOWE1VL34/bin/ruby: File name too long
```
Even though that function exits non-zero, it doesn't propagate due to a missing `set -e` at the top level. This ensures all top level `bin/` executables exit on failure.
* Explicit heroku-20 check and failure
Issue heroku#1628 shows that it's unclear when a Ruby version cannot be found on an unsupported stack, and that it is expected behavior. To avoid this confusion, we can explicitly error when using a recently EOL stack.
* Better stack error message
This guards against execution using unknown or unexpected stacks. In addition, its behavior is tested.
* Fix shellcheck
When I added this function with local variable:
```
function checks::ensure_supported_stack() {
local stack="${1}"
```
It triggered this shellcheck failure on an unrelated line:
```
$ shellcheck bin/support/bash_functions.sh -x
In bin/support/bash_functions.sh line 35:
if [ "$STACK" == "heroku-24" ]; then
^----^ SC2153 (info): Possible misspelling: STACK may not be assigned. Did you mean stack?
```
This fixes the lint.
0 commit comments