Skip to content

Commit f5bb981

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 b6be1f3 commit f5bb981

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
@@ -412,7 +412,7 @@ test_expect_success SYMLINKS 're-init to move gitdir symlink' '
412412
# Tests for the hidden file attribute on windows
413413
is_hidden () {
414414
# Use the output of `attrib`, ignore the absolute path
415-
case "$(attrib "$1")" in *H*?:*) return 0;; esac
415+
case "$("$SYSTEMROOT"/system32/attrib "$1")" in *H*?:*) return 0;; esac
416416
return 1
417417
}
418418

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)