Skip to content

Commit c66c4c2

Browse files
committed
fix(substitute): normalize package version
1 parent e3bef6a commit c66c4c2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

crates/soar-core/src/utils.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,10 @@ pub fn substitute_placeholders(template: &str, version: Option<&str>) -> String
102102
.replace("{os}", std::env::consts::OS);
103103

104104
match version {
105-
Some(v) => result.replace("{version}", v),
105+
Some(v) => {
106+
let normalized_version = v.strip_prefix('v').unwrap_or(v);
107+
result.replace("{version}", normalized_version)
108+
}
106109
None => result,
107110
}
108111
}

0 commit comments

Comments
 (0)