implement TargetSelection::is_cygwin
function
Signed-off-by: onur-ozkan <work@onurozkan.dev>
This commit is contained in:
parent
ae3703cdf2
commit
c4d7f1d29f
1 changed files with 6 additions and 0 deletions
|
@ -565,6 +565,12 @@ impl TargetSelection {
|
||||||
self.ends_with("windows-gnu")
|
self.ends_with("windows-gnu")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn is_cygwin(&self) -> bool {
|
||||||
|
self.is_windows() &&
|
||||||
|
// ref. https://cygwin.com/pipermail/cygwin/2022-February/250802.html
|
||||||
|
env::var("OSTYPE").is_ok_and(|v| v.to_lowercase().contains("cygwin"))
|
||||||
|
}
|
||||||
|
|
||||||
/// Path to the file defining the custom target, if any.
|
/// Path to the file defining the custom target, if any.
|
||||||
pub fn filepath(&self) -> Option<&Path> {
|
pub fn filepath(&self) -> Option<&Path> {
|
||||||
self.file.as_ref().map(Path::new)
|
self.file.as_ref().map(Path::new)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue