Skip to content

Commit

Permalink
fix #3663. Feedback in terminal when opening browser for docs
Browse files Browse the repository at this point in the history
  • Loading branch information
brettearle authored and rami3l committed Mar 8, 2024
1 parent 45a2881 commit b4b9a2e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/cli/rustup_mode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1598,9 +1598,14 @@ fn doc(cfg: &Cfg, m: &ArgMatches) -> Result<utils::ExitCode> {
let doc_url = if let Some(topic) = m.get_one::<String>("topic") {
topical_path = topical_doc::local_path(&toolchain.doc_path("").unwrap(), topic)?;
topical_path.to_str().unwrap()
} else if let Some((_, _, path)) = DOCS_DATA.iter().find(|(name, _, _)| m.get_flag(name)) {
} else if let Some((name, _, path)) = DOCS_DATA.iter().find(|(name, _, _)| m.get_flag(name)) {
writeln!(
process().stderr().lock(),
"Opening docs named `{name}` in your browser"
)?;
path
} else {
writeln!(process().stderr().lock(), "Opening docs in your browser")?;
"index.html"
};

Expand Down

0 comments on commit b4b9a2e

Please sign in to comment.