Skip to content

Commit

Permalink
Rollup merge of rust-lang#133550 - onur-ozkan:doc-log, r=jieyouxu
Browse files Browse the repository at this point in the history
print generated doc paths

Resolves rust-lang#133002
  • Loading branch information
GuillaumeGomez authored Nov 28, 2024
2 parents 63a6e9c + e11cfeb commit ed913fe
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/bootstrap/src/core/builder/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1523,15 +1523,19 @@ impl<'a> Builder<'a> {
pub(crate) fn maybe_open_in_browser<S: Step>(&self, path: impl AsRef<Path>) {
if self.was_invoked_explicitly::<S>(Kind::Doc) {
self.open_in_browser(path);
} else {
self.info(&format!("Doc path: {}", path.as_ref().display()));
}
}

pub(crate) fn open_in_browser(&self, path: impl AsRef<Path>) {
let path = path.as_ref();

if self.config.dry_run() || !self.config.cmd.open() {
self.info(&format!("Doc path: {}", path.display()));
return;
}

let path = path.as_ref();
self.info(&format!("Opening doc {}", path.display()));
if let Err(err) = opener::open(path) {
self.info(&format!("{err}\n"));
Expand Down

0 comments on commit ed913fe

Please sign in to comment.