Closed Drunk-Dream closed 4 months ago
What will happen if it's MSYS2 on Windows 11? Is it still going to have 10.0 in the sysname? Maybe it's better to check for a substring MINGW32_NT
?
What will happen if it's MSYS2 on Windows 11? Is it still going to have 10.0 in the sysname? Maybe it's better to check for a substring
MINGW32_NT
?
Yes, MSYS2 on Windows 11 will still have 10.0 in the sysname. I think it would be a good idea to check for the MINGW32_NT
substring.
Please check the substring
Please check the substring
Ok, in the new commit I am using string.find()
to check the substring MINGW32_NT
.
This PR fixes an issue where the
get_system_info()
function fails to recognize the "MINGW32_NT-10.0" sysname returned when running on Windows under MSYS2.Changes
get_system_info()
to check for "MINGW32_NT-10.0" sysname and handle it the same as "Windows_NT"Reason for Change
Currently,
get_system_info()
only checks for "Windows_NT" sysname to identify Windows. When running on MSYS2, the sysname is "MINGW32_NT-10.0" which causesget_system_info()
to fail with an "Unknown sysname" warning.Checking for and handling MINGW32_NT-10.0 allows
get_system_info()
to work properly when running on Windows under MSYS2.