Skip to content

Commit b4b9a2e

Browse files
brettearlerami3l
authored andcommitted
fix #3663. Feedback in terminal when opening browser for docs
1 parent 45a2881 commit b4b9a2e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/cli/rustup_mode.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1598,9 +1598,14 @@ fn doc(cfg: &Cfg, m: &ArgMatches) -> Result<utils::ExitCode> {
15981598
let doc_url = if let Some(topic) = m.get_one::<String>("topic") {
15991599
topical_path = topical_doc::local_path(&toolchain.doc_path("").unwrap(), topic)?;
16001600
topical_path.to_str().unwrap()
1601-
} else if let Some((_, _, path)) = DOCS_DATA.iter().find(|(name, _, _)| m.get_flag(name)) {
1601+
} else if let Some((name, _, path)) = DOCS_DATA.iter().find(|(name, _, _)| m.get_flag(name)) {
1602+
writeln!(
1603+
process().stderr().lock(),
1604+
"Opening docs named `{name}` in your browser"
1605+
)?;
16021606
path
16031607
} else {
1608+
writeln!(process().stderr().lock(), "Opening docs in your browser")?;
16041609
"index.html"
16051610
};
16061611

0 commit comments

Comments
 (0)