about summary refs log tree commit diff
path: root/library/std/src/sys
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2023-08-02 21:20:51 +0200
committerRalf Jung <post@ralfj.de>2023-08-24 08:08:46 +0200
commitf2b139f23d574ca1d2c764b581a3b993e9af1570 (patch)
tree85d8abb1876ab1690f28e1bb594ba8b83847dbea /library/std/src/sys
parent95305899b8493a65065ebdeae44e841d243621eb (diff)
downloadrust-f2b139f23d574ca1d2c764b581a3b993e9af1570.tar.gz
rust-f2b139f23d574ca1d2c764b581a3b993e9af1570.zip
Command: also print removed env vars
Diffstat (limited to 'library/std/src/sys')
-rw-r--r--library/std/src/sys/unix/process/process_common.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/library/std/src/sys/unix/process/process_common.rs b/library/std/src/sys/unix/process/process_common.rs
index 640648e8707..9362fc7f205 100644
--- a/library/std/src/sys/unix/process/process_common.rs
+++ b/library/std/src/sys/unix/process/process_common.rs
@@ -561,6 +561,8 @@ impl fmt::Debug for Command {
             for (key, value_opt) in self.get_envs() {
                 if let Some(value) = value_opt {
                     write!(f, "{}={value:?} ", key.to_string_lossy())?;
+                } else {
+                    write!(f, "unset({}) ", key.to_string_lossy())?;
                 }
             }
             if self.program != self.args[0] {