diff --git a/crates/detect-targets/src/detect.rs b/crates/detect-targets/src/detect.rs index 71940e71..b2b859d0 100644 --- a/crates/detect-targets/src/detect.rs +++ b/crates/detect-targets/src/detect.rs @@ -95,4 +95,6 @@ async fn get_target_from_rustc() -> Option { .lines() .filter_map(|line| line.ok()) .find_map(|line| line.strip_prefix("host: ").map(|host| host.to_owned())) + // All valid target triple must be in the form of $arch-$os-$abi. + .filter(|target| target.split('-').count() >= 3) }