Skip to content

Commit b5bbcb7

Browse files
authored
Fix duplicate word in binary build script error messages (#1635)
Fixes `Error: Error: ...` being shown in the error messages shown by the internal binary build script (used by buildpack maintainers to build/upload new Python versions). Also renames `error()` to `abort()` to make it clearer it terminates the script.
1 parent d13fbbd commit b5bbcb7

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

builds/build_python_runtime.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ INSTALL_DIR="/tmp/python"
1414
SRC_DIR="/tmp/src"
1515
UPLOAD_DIR="/tmp/upload"
1616

17-
function error() {
17+
function abort() {
1818
echo "Error: ${1}" >&2
1919
exit 1
2020
}
@@ -45,12 +45,12 @@ case "${STACK}" in
4545
)
4646
;;
4747
*)
48-
error "Error: Unsupported stack '${STACK}'!"
48+
abort "Unsupported stack '${STACK}'!"
4949
;;
5050
esac
5151

5252
if [[ ! " ${SUPPORTED_PYTHON_VERSIONS[*]} " == *" ${PYTHON_MAJOR_VERSION} "* ]]; then
53-
error "Error: Python ${PYTHON_MAJOR_VERSION} is not supported on ${STACK}!"
53+
abort "Python ${PYTHON_MAJOR_VERSION} is not supported on ${STACK}!"
5454
fi
5555

5656
# The release keys can be found on https://www.python.org/downloads/ -> "OpenPGP Public Keys".
@@ -68,7 +68,7 @@ case "${PYTHON_MAJOR_VERSION}" in
6868
GPG_KEY_FINGERPRINT='E3FF2839C048B25C084DEBE9B26995E310250568'
6969
;;
7070
*)
71-
error "Error: Unsupported Python version '${PYTHON_MAJOR_VERSION}'!"
71+
abort "Unsupported Python version '${PYTHON_MAJOR_VERSION}'!"
7272
;;
7373
esac
7474

@@ -184,7 +184,7 @@ if [[ "${PYTHON_MAJOR_VERSION}" == 3.[8-9] ]]; then
184184
# - `lib/python3.9/config-3.9-x86_64-linux-gnu/libpython3.9.a`
185185
find "${INSTALL_DIR}" -type f -name '*.a' -print -exec strip --strip-unneeded '{}' +
186186
elif ! find "${INSTALL_DIR}" -type f -name '*.a' -print -exec false '{}' +; then
187-
error "Error: Unexpected static libraries found!"
187+
abort "Unexpected static libraries found!"
188188
fi
189189

190190
# Remove unneeded test directories, similar to the official Docker Python images:

0 commit comments

Comments
 (0)