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.
This commit is contained in:
Andrew Dunstan 2022-01-27 08:17:42 -05:00
parent fefce9ef98
commit acea505186
No known key found for this signature in database
GPG Key ID: 99FA7FCB59FC3B81
1 changed files with 2 additions and 1 deletions

View File

@ -142,7 +142,8 @@ BEGIN
# Must be set early
$windows_os = $Config{osname} eq 'MSWin32' || $Config{osname} eq 'msys';
# Check if this environment is MSYS2.
$is_msys2 = $^O eq 'msys' && `uname -or` =~ /^[2-9].*Msys/;
$is_msys2 = $windows_os && -x '/usr/bin/uname' &&
`uname -or` =~ /^[2-9].*Msys/;
if ($windows_os)
{