Skip to content

Commit 84a9573

Browse files
committed
rust: match entire target triple
Otherwise if 1 triple contains a subset of another, it may yield a false positive and apply the wrong settings. We will see this as we introduce more ARM targets.
1 parent 6aa92b8 commit 84a9573

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,11 @@ fn validate_distribution(dist_path: &Path) -> Result<Vec<String>> {
440440

441441
let triple = RECOGNIZED_TRIPLES
442442
.iter()
443-
.find(|triple| dist_path.to_string_lossy().contains(*triple))
443+
.find(|triple| {
444+
dist_path
445+
.to_string_lossy()
446+
.contains(&format!("-{}-", triple))
447+
})
444448
.ok_or_else(|| {
445449
anyhow!(
446450
"could not identify triple from distribution filename: {}",

0 commit comments

Comments
 (0)