Skip to content

Commit 7486870

Browse files
committed
feat(rustdoc): diplay env vars in extra verbose mode
This seems to be an overlook
1 parent 40ee338 commit 7486870

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/cargo/core/compiler/compilation.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,10 @@ impl<'gctx> Compilation<'gctx> {
199199
unit: &Unit,
200200
script_meta: Option<Metadata>,
201201
) -> CargoResult<ProcessBuilder> {
202-
let rustdoc = ProcessBuilder::new(&*self.gctx.rustdoc()?);
202+
let mut rustdoc = ProcessBuilder::new(&*self.gctx.rustdoc()?);
203+
if self.gctx.extra_verbose() {
204+
rustdoc.display_env_vars();
205+
}
203206
let cmd = fill_rustc_tool_env(rustdoc, unit);
204207
let mut cmd = self.fill_env(cmd, &unit.pkg, script_meta, unit.kind, ToolKind::Rustdoc)?;
205208
cmd.retry_with_argfile(true);

tests/testsuite/profile_targets.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,7 @@ fn profile_selection_doc() {
724724
[RUNNING] `[..][ROOT]/foo/target/debug/build/foo-[HASH]/build-script-build`
725725
[foo 0.0.1] foo custom build PROFILE=debug DEBUG=true OPT_LEVEL=0
726726
[DOCUMENTING] foo v0.0.1 ([ROOT]/foo)
727-
[RUNNING] `rustdoc [..]--crate-name foo src/lib.rs [..]
727+
[RUNNING] `[..] rustdoc [..]--crate-name foo src/lib.rs [..]
728728
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
729729
[GENERATED] [ROOT]/foo/target/doc/foo/index.html
730730

0 commit comments

Comments
 (0)