Skip to content

Commit 43af760

Browse files
committed
test(e2e/47): strip trailing CR from jq output on git-bash/Windows
The Windows CI run reported: FAIL: basename is not pcm.cache/gcm.cache: 'pcm.cache ' The closing quote on the next line is the giveaway — the value carries a trailing `\r`. `jq.exe` on git-bash emits CRLF; `mapfile -t` strips LF but leaves CR, so every downstream comparison saw `pcm.cache$'\r'` and failed. Trim with `${v%$'\r'}` per element. The source-code fix (un-escape ninja sequences) is working — the value itself is now a clean `C:\Users\...\pcm.cache`, no `$:` artefact.
1 parent cc1f12d commit 43af760

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

tests/e2e/47_cdb_prebuilt_module_path_abs.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ fi
4646

4747
fail=0
4848
for v in "${vals[@]}"; do
49+
# `jq` on git-bash/Windows emits CRLF line endings; mapfile strips the LF
50+
# but leaves a trailing CR which then poisons every downstream string
51+
# comparison (basename ends with `\r`, regex matches go sideways).
52+
v="${v%$'\r'}"
4953
echo " checking: $v"
5054

5155
# Must NOT carry ninja-escape artefacts. The key signal is `$:` (drive

0 commit comments

Comments
 (0)