Skip to content

Commit 8cde3d9

Browse files
committed
mingw: make is_hidden tests in t0001/t5611 more robust
We should not actually expect the first `attrib.exe` in the PATH to be the one we are looking for. Or that it is in the PATH, for that matter. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 5eeb857 commit 8cde3d9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

t/t0001-init.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ test_expect_success SYMLINKS 're-init to move gitdir symlink' '
374374
# Tests for the hidden file attribute on windows
375375
is_hidden () {
376376
# Use the output of `attrib`, ignore the absolute path
377-
case "$(attrib "$1")" in *H*?:*) return 0;; esac
377+
case "$("$SYSTEMROOT"/system32/attrib "$1")" in *H*?:*) return 0;; esac
378378
return 1
379379
}
380380

t/t5611-clone-config.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ test_expect_success 'clone -c config is available during clone' '
4040
# Tests for the hidden file attribute on windows
4141
is_hidden () {
4242
# Use the output of `attrib`, ignore the absolute path
43-
case "$(attrib "$1")" in *H*?:*) return 0;; esac
43+
case "$("$SYSTEMROOT"/system32/attrib "$1")" in *H*?:*) return 0;; esac
4444
return 1
4545
}
4646

0 commit comments

Comments
 (0)