Skip to content

Commit 757cf46

Browse files
committed
tests/template: Fix git_for_windows_native_path
Turns out I made a mistake in the previous commit in adapting the conditional to use `EXEPATH` instead of `command -v cygpath`, as the tests were still broken on regular MSYS2 and Cygwin. This change resolves the breakage and continues to work on Git for Windows.
1 parent f4f5fd7 commit 757cf46

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/template.bats

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ git_for_windows_native_path() {
8888
local path="$1"
8989
local protocol="${path%%://*}"
9090

91-
if [[ ! "$EXEPATH" =~ \\Git$ && "$protocol" != "$path" &&
92-
"$protocol" != 'file' ]]; then
91+
if [[ ! "$EXEPATH" =~ \\Git$ ]] ||
92+
[[ "$protocol" != "$path" && "$protocol" != 'file' ]]; then
9393
printf '%s' "$path"
9494
elif [[ "$protocol" == 'file' ]]; then
9595
printf 'file://'

0 commit comments

Comments
 (0)