Skip to content

Commit

Permalink
feat(rustdoc): diplay env vars in extra verbose mode
Browse files Browse the repository at this point in the history
This seems to be an overlook
  • Loading branch information
weihanglo committed Nov 12, 2024
1 parent 40ee338 commit 7486870
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/cargo/core/compiler/compilation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,10 @@ impl<'gctx> Compilation<'gctx> {
unit: &Unit,
script_meta: Option<Metadata>,
) -> CargoResult<ProcessBuilder> {
let rustdoc = ProcessBuilder::new(&*self.gctx.rustdoc()?);
let mut rustdoc = ProcessBuilder::new(&*self.gctx.rustdoc()?);
if self.gctx.extra_verbose() {
rustdoc.display_env_vars();
}
let cmd = fill_rustc_tool_env(rustdoc, unit);
let mut cmd = self.fill_env(cmd, &unit.pkg, script_meta, unit.kind, ToolKind::Rustdoc)?;
cmd.retry_with_argfile(true);
Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/profile_targets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ fn profile_selection_doc() {
[RUNNING] `[..][ROOT]/foo/target/debug/build/foo-[HASH]/build-script-build`
[foo 0.0.1] foo custom build PROFILE=debug DEBUG=true OPT_LEVEL=0
[DOCUMENTING] foo v0.0.1 ([ROOT]/foo)
[RUNNING] `rustdoc [..]--crate-name foo src/lib.rs [..]
[RUNNING] `[..] rustdoc [..]--crate-name foo src/lib.rs [..]
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
[GENERATED] [ROOT]/foo/target/doc/foo/index.html
Expand Down

0 comments on commit 7486870

Please sign in to comment.