Commit 1e5a65a
committed
Fix script_phases.sh error() helper: missing echo + arg truncation (#56955)
The error() helper had two bugs since its extraction from the Ruby
script in commit 1dbbeb4:
1. The line that mirrors the formatted message to SCRIPT_OUTPUT_FILE_0
was missing the leading echo, so [Codegen] $1 was instead being
executed as a command. Under set -e this aborts the script with
status 127 before reaching exit 1, and SCRIPT_OUTPUT_FILE_0 receives
a shell command not found error instead of the intended log line.
2. The function only printed $1, so multi-arg callers like find_node
(which passes its message across three space-and-backslash
continuation strings) were silently truncated to the first chunk.
Switch both lines to use $* so all positional arguments are joined
into a single space-separated message, and add the missing echo so
the second line actually appends to the log file.
Fixes #56955.1 parent b32a6c9 commit 1e5a65a
1 file changed
Lines changed: 7 additions & 2 deletions
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
21 | 26 | | |
22 | 27 | | |
23 | 28 | | |
| |||
0 commit comments