diff options
| author | Josh Stone <jistone@redhat.com> | 2022-08-16 11:52:43 -0700 |
|---|---|---|
| committer | Josh Stone <jistone@redhat.com> | 2022-08-23 13:00:18 -0700 |
| commit | d3f2d0cae0c8b19c7036d068b805832be8b163cb (patch) | |
| tree | 4980ea69d6fefc5115d4dc92bc2c75336edf417b | |
| parent | 2ead65f0023825417f4d82d2e740bc43ee1f3749 (diff) | |
| download | rust-d3f2d0cae0c8b19c7036d068b805832be8b163cb.tar.gz rust-d3f2d0cae0c8b19c7036d068b805832be8b163cb.zip | |
rustbuild: fix version parsing for browser-ui-test
| -rw-r--r-- | src/bootstrap/test.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs index baad0c75295..242ad98813d 100644 --- a/src/bootstrap/test.rs +++ b/src/bootstrap/test.rs @@ -905,7 +905,10 @@ fn get_browser_ui_test_version_inner(npm: &Path, global: bool) -> Option<String> .output() .map(|output| String::from_utf8_lossy(&output.stdout).into_owned()) .unwrap_or(String::new()); - lines.lines().find_map(|l| l.split(":browser-ui-test@").skip(1).next()).map(|v| v.to_owned()) + lines + .lines() + .find_map(|l| l.split(':').nth(1)?.strip_prefix("browser-ui-test@")) + .map(|v| v.to_owned()) } fn get_browser_ui_test_version(npm: &Path) -> Option<String> { |
