diff options
author | Adam Dinwoodie <adam@dinwoodie.org> | 2022-09-15 10:57:17 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-09-15 20:29:51 +0300 |
commit | 255a6f91ae4600ee2d257670477caf97b7986470 (patch) | |
tree | b6041d06e4c8addb068b60f96eb7aa90d0f1db2e /t/t1800-hook.sh | |
parent | d42b38dfb5edf1a7fddd9542d722f91038407819 (diff) |
t1800: correct test to handle Cygwin
On Cygwin, when failing to spawn a process using start_command, Git
outputs the same error as on Linux systems, rather than using the
GIT_WINDOWS_NATIVE-specific error output. The WINDOWS test prerequisite
is set in both Cygwin and native Windows environments, which means it's
not appropriate to use to anticipate the error output from
start_command. Instead, use the MINGW test prerequisite, which is only
set for Git in native Windows environments, and not for Cygwin.
Signed-off-by: Adam Dinwoodie <adam@dinwoodie.org>
Helped-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1800-hook.sh')
-rwxr-xr-x | t/t1800-hook.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/t/t1800-hook.sh b/t/t1800-hook.sh index 64096adac7..43fcb7c0bf 100755 --- a/t/t1800-hook.sh +++ b/t/t1800-hook.sh @@ -157,9 +157,9 @@ test_expect_success 'git hook run a hook with a bad shebang' ' write_script bad-hooks/test-hook "/bad/path/no/spaces" </dev/null && # TODO: We should emit the same (or at least a more similar) - # error on Windows and !Windows. See the OS-specific code in - # start_command() - if test_have_prereq !WINDOWS + # error on MINGW (essentially Git for Windows) and all other + # platforms.. See the OS-specific code in start_command() + if test_have_prereq !MINGW then cat >expect <<-\EOF fatal: cannot run bad-hooks/test-hook: ... |