Skip to content

Commit 99bd9f9

Browse files
authored
Fix leftover output::error args usages (#1671)
In #1666 the API for `output::error` was simplified, such that it only supports the message being passed via stdin (since that's the pattern used when passing a multi-line HERE-doc, and we want to encourage detailed error messages). However, there were a couple of remaining instances not switched over to the stdin API. These usages are in codepaths that cannot be tested via integration tests since they are unreachable unless there was an internal buildpack bug. (And Shellcheck also didn't spot these instances of unconsumed passed args.) GUS-W-17048951.
1 parent d92180d commit 99bd9f9

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/utils.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ function utils::bundled_pip_module_path() {
1818
local bundled_pip_wheel="${bundled_pip_wheel_list[0]}"
1919

2020
if [[ -z "${bundled_pip_wheel}" ]]; then
21-
output::error "Error: Failed to locate the bundled pip wheel."
21+
output::error <<-'EOF'
22+
Error: Failed to locate the bundled pip wheel.
23+
EOF
2224
meta_set "failure_reason" "bundled-pip-not-found"
2325
return 1
2426
fi
@@ -28,7 +30,9 @@ function utils::bundled_pip_module_path() {
2830

2931
function utils::abort_internal_error() {
3032
local message="${1}"
31-
output::error "Internal error: ${message} (line $(caller || true))."
33+
output::error <<-EOF
34+
Internal error: ${message} (line $(caller || true)).
35+
EOF
3236
meta_set "failure_reason" "internal-error"
3337
exit 1
3438
}

0 commit comments

Comments
 (0)