Skip to content

Commit 56f8c22

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 4803a6a commit 56f8c22

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

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)