Skip to content

Commit ac62c24

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 4598d17 commit ac62c24

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
@@ -64,7 +64,7 @@ test_expect_success 'git -c remote.origin.fetch=<refspec> clone works' '
6464
# Tests for the hidden file attribute on windows
6565
is_hidden () {
6666
# Use the output of `attrib`, ignore the absolute path
67-
case "$(attrib "$1")" in *H*?:*) return 0;; esac
67+
case "$("$SYSTEMROOT"/system32/attrib "$1")" in *H*?:*) return 0;; esac
6868
return 1
6969
}
7070

0 commit comments

Comments
 (0)