Skip to content

Commit ec4b6a8

Browse files
[Outreachy PATCH] t0001: avoid pipes in test scripts
Avoid piping output from git version directly into sed to ensure that any command failure is properly caught by test scripts. Signed-off-by: Srujith Poojary <poojarysrujith@gmail.com>
1 parent 6de20f6 commit ec4b6a8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎t/t0001-init.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@ test_expect_success 'default ref format' '
678678
sane_unset GIT_DEFAULT_REF_STORAGE_FORMAT &&
679679
git init refformat
680680
) &&
681-
git version --build-options | sed -ne "s/^default-ref-storage-format: //p" >expect &&
681+
git version --build-options >build-options && sed -ne "s/^default-ref-storage-format: //p" build-options >expect &&
682682
git -C refformat rev-parse --show-ref-storage-format >actual &&
683683
test_cmp expect actual
684684
'

0 commit comments

Comments
 (0)