Skip to content

Commit d3f2d0c

Browse files
committed
rustbuild: fix version parsing for browser-ui-test
1 parent 2ead65f commit d3f2d0c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/bootstrap/test.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -905,7 +905,10 @@ fn get_browser_ui_test_version_inner(npm: &Path, global: bool) -> Option<String>
905905
.output()
906906
.map(|output| String::from_utf8_lossy(&output.stdout).into_owned())
907907
.unwrap_or(String::new());
908-
lines.lines().find_map(|l| l.split(":browser-ui-test@").skip(1).next()).map(|v| v.to_owned())
908+
lines
909+
.lines()
910+
.find_map(|l| l.split(':').nth(1)?.strip_prefix("browser-ui-test@"))
911+
.map(|v| v.to_owned())
909912
}
910913

911914
fn get_browser_ui_test_version(npm: &Path) -> Option<String> {

0 commit comments

Comments
 (0)