Skip to content

Commit 5384463

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 9e571ae commit 5384463

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

t/t5611-clone-config.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ test_expect_success 'clone -c remote.<remote>.fetch=<refspec> --origin=<name>' '
9595
# Tests for the hidden file attribute on windows
9696
is_hidden () {
9797
# Use the output of `attrib`, ignore the absolute path
98-
case "$(attrib "$1")" in *H*?:*) return 0;; esac
98+
case "$("$SYSTEMROOT"/system32/attrib "$1")" in *H*?:*) return 0;; esac
9999
return 1
100100
}
101101

0 commit comments

Comments
 (0)