Skip to content

Commit

Permalink
print generated doc paths
Browse files Browse the repository at this point in the history
Signed-off-by: onur-ozkan <[email protected]>
  • Loading branch information
onur-ozkan committed Nov 27, 2024
1 parent 6b6a867 commit e11cfeb
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 e11cfeb

Please sign in to comment.