Skip to content

Commit 4a01a07

Browse files
dschoGit for Windows Build Agent
authored and
Git for Windows Build Agent
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 7bf3e05 commit 4a01a07

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
@@ -401,7 +401,7 @@ test_expect_success SYMLINKS 're-init to move gitdir symlink' '
401401
# Tests for the hidden file attribute on windows
402402
is_hidden () {
403403
# Use the output of `attrib`, ignore the absolute path
404-
case "$(attrib "$1")" in *H*?:*) return 0;; esac
404+
case "$("$SYSTEMROOT"/system32/attrib "$1")" in *H*?:*) return 0;; esac
405405
return 1
406406
}
407407

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)