Skip to content

Commit af36fbf

Browse files
committed
few fixes to rust rustdoc-gui tests on windows
1 parent fd0a331 commit af36fbf

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

config.example.toml

+7
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,13 @@ changelog-seen = 2
250250
# target when running tests, otherwise this can be omitted.
251251
#nodejs = "node"
252252

253+
# The npm executable to use. Note that this is used for rustdoc-gui tests,
254+
# otherwise this can be omitted.
255+
#
256+
# Under Windows this should be `npm.cmd` or path to it (verified on nodejs v18.06), or
257+
# error will be emitted.
258+
#npm = "npm"
259+
253260
# Python interpreter to use for various tasks throughout the build, notably
254261
# rustdoc tests, the lldb python interpreter, and some dist bits and pieces.
255262
#

src/tools/rustdoc-gui-test/src/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ fn get_browser_ui_test_version_inner(npm: &Path, global: bool) -> Option<String>
2020
.unwrap_or(String::new());
2121
lines
2222
.lines()
23-
.find_map(|l| l.split(':').nth(1)?.strip_prefix("browser-ui-test@"))
23+
.find_map(|l| l.rsplit(':').next()?.strip_prefix("browser-ui-test@"))
2424
.map(|v| v.to_owned())
2525
}
2626

0 commit comments

Comments
 (0)