Skip to content

Commit 999dc1d

Browse files
committed
Improve msys2 detection for TAP tests
Perl instances on some msys toolchains (e.g. UCRT64) have their configured osname set to 'MSWin32' rather than 'msys'. The test for the msys2 platform is adjusted accordingly. Backpatch to release 14.
1 parent d1cca94 commit 999dc1d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/test/perl/TestLib.pm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ BEGIN
143143
# Must be set early
144144
$windows_os = $Config{osname} eq 'MSWin32' || $Config{osname} eq 'msys';
145145
# Check if this environment is MSYS2.
146-
$is_msys2 = $^O eq 'msys' && `uname -or` =~ /^[2-9].*Msys/;
146+
$is_msys2 = $windows_os && -x '/usr/bin/uname' &&
147+
`uname -or` =~ /^[2-9].*Msys/;
147148

148149
if ($windows_os)
149150
{

0 commit comments

Comments
 (0)