Skip to content

Commit 29582ab

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 82c9ab3 commit 29582ab

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
@@ -48,7 +48,7 @@ test_expect_success 'clone -c config is available during clone' '
4848
# Tests for the hidden file attribute on windows
4949
is_hidden () {
5050
# Use the output of `attrib`, ignore the absolute path
51-
case "$(attrib "$1")" in *H*?:*) return 0;; esac
51+
case "$("$SYSTEMROOT"/system32/attrib "$1")" in *H*?:*) return 0;; esac
5252
return 1
5353
}
5454

0 commit comments

Comments
 (0)