mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-21 03:57:38 +00:00
![]() Reduce false positives in msys2 detection Currently msys2 will be detected by getting the file path and looking to see if it contains the substrings "msys-" and "-ptr" (or "cygwin-" and "-pty"). This risks false positives, especially with filesystem files and if `GetFileInformationByHandleEx` returns a [full path](https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/ntifs/nf-ntifs-ntqueryinformationfile#remarks). This PR adds a check to see if the handle is a pipe before doing the substring search. Additionally, for "msys2-" or "cygwin-" it only checks if the file name starts with the substring rather than looking at the whole path. |
||
---|---|---|
.. | ||
common | ||
hermit | ||
itron | ||
sgx | ||
solid | ||
unix | ||
unsupported | ||
wasi | ||
wasm | ||
windows | ||
mod.rs |