Skip to content

Commit 55931af

Browse files
committed
fix(e2e): route log_error/log_warn to stderr so errors aren't swallowed by $(...)
Signed-off-by: puneetmahajan <59960662+puneet2019@users.noreply.github.com>
1 parent a853f1b commit 55931af

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

e2e/kind/scripts/lib.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ fi
1515
# ── Logging ───────────────────────────────────────────────────────────────────
1616
log_info() { echo -e "\033[0;34m[INFO]\033[0m $*"; }
1717
log_success() { echo -e "\033[0;32m[PASS]\033[0m $*"; }
18-
log_error() { echo -e "\033[0;31m[FAIL]\033[0m $*"; }
19-
log_warn() { echo -e "\033[0;33m[WARN]\033[0m $*"; }
18+
# Errors/warnings to stderr: else `x=$(fn)` swallows them into x (hidden failure + polluted value).
19+
log_error() { echo -e "\033[0;31m[FAIL]\033[0m $*" >&2; }
20+
log_warn() { echo -e "\033[0;33m[WARN]\033[0m $*" >&2; }
2021

2122
# ── Chain queries ─────────────────────────────────────────────────────────────
2223

0 commit comments

Comments
 (0)