Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Bash's inherit_errexit #1655

Merged
merged 1 commit into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## [Unreleased]

- Improved the robustness of buildpack error handling by enabling `inherit_errexit`. ([#1655](https://github.com/heroku/heroku-buildpack-python/pull/1655))

## [v258] - 2024-10-01

Expand Down
1 change: 1 addition & 0 deletions bin/compile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# shellcheck disable=SC2250 # TODO: Use braces around variable references even when not strictly required.

set -euo pipefail
shopt -s inherit_errexit

# Note: This can't be enabled via app config vars, since at this point they haven't been loaded from ENV_DIR.
if [[ "${BUILDPACK_XTRACE:-0}" == "1" ]]; then
Expand Down
1 change: 1 addition & 0 deletions bin/detect
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# See: https://devcenter.heroku.com/articles/buildpack-api

set -euo pipefail
shopt -s inherit_errexit

BUILD_DIR="${1}"

Expand Down
1 change: 1 addition & 0 deletions bin/release
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# See: https://devcenter.heroku.com/articles/buildpack-api

set -euo pipefail
shopt -s inherit_errexit

BUILD_DIR="${1}"

Expand Down
1 change: 1 addition & 0 deletions bin/report
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
# when developing run `make compile` in this repo locally, which runs `bin/report` too.

set -euo pipefail
shopt -s inherit_errexit

CACHE_DIR="${2}"

Expand Down
1 change: 1 addition & 0 deletions bin/test-compile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# See: https://devcenter.heroku.com/articles/testpack-api

set -euo pipefail
shopt -s inherit_errexit

# The absolute path to the root of the buildpack.
BUILDPACK_DIR=$(cd "$(dirname "$(dirname "${BASH_SOURCE[0]}")")" && pwd)
Expand Down
1 change: 1 addition & 0 deletions builds/build_python_runtime.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bash

set -euo pipefail
shopt -s inherit_errexit

PYTHON_VERSION="${1:?"Error: The Python version to build must be specified as the first argument."}"
PYTHON_MAJOR_VERSION="${PYTHON_VERSION%.*}"
Expand Down
1 change: 1 addition & 0 deletions builds/test_python_runtime.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env bash

set -euo pipefail
shopt -s inherit_errexit

ARCHIVE_FILEPATH="${1:?"Error: The filepath of the Python runtime archive must be specified as the first argument."}"

Expand Down
1 change: 1 addition & 0 deletions etc/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# shellcheck disable=SC2250 # TODO: Use braces around variable references even when not strictly required.

set -euo pipefail
shopt -s inherit_errexit

BP_NAME=${1:-"heroku/python"}

Expand Down