Skip to content

Commit 87c894b

Browse files
committed
fix #3663. Feedback in terminal when opening browser for docs
1 parent 8231e9a commit 87c894b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/cli/rustup_mode.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1583,9 +1583,15 @@ fn doc(cfg: &Cfg, m: &ArgMatches) -> Result<utils::ExitCode> {
15831583
let doc_url = if let Some(topic) = m.get_one::<String>("topic") {
15841584
topical_path = topical_doc::local_path(&toolchain.doc_path("").unwrap(), topic)?;
15851585
topical_path.to_str().unwrap()
1586-
} else if let Some((_, _, path)) = DOCS_DATA.iter().find(|(name, _, _)| m.get_flag(name)) {
1586+
} else if let Some((name, _, path)) = DOCS_DATA.iter().find(|(name, _, _)| m.get_flag(name)) {
1587+
writeln!(
1588+
process().stdout().lock(),
1589+
"Opening docs -{} in your browser",
1590+
name
1591+
)?;
15871592
path
15881593
} else {
1594+
writeln!(process().stdout().lock(), "Opening docs in your browser")?;
15891595
"index.html"
15901596
};
15911597

0 commit comments

Comments
 (0)