about summary refs log tree commit diff
path: root/library/std/src/sys_common
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-09-22 12:15:25 +0200
committerGitHub <noreply@github.com>2023-09-22 12:15:25 +0200
commit9887dfab2c7a204fafa2c1af6de5fd304f587322 (patch)
tree4a75f0f01fc5392575ceb5a7959de23e7c06fb2f /library/std/src/sys_common
parent8759de0a4935e677fdce99a849addea2d5318da9 (diff)
parent98c94ec72f5c9319b9192d688c5abd851dcd2d15 (diff)
Rollup merge of #114379 - RalfJung:command-removed-env-vars, r=m-ou-se
Command: also print removed env vars

There is no real shell syntax for unsetting an env var so easily, so we have to make one up. But we already do that for showing the 'program' name so I hope that's okay here, too. No strong opinion on what that should look like, I went with `unset(VAR_NAME)` for now.
Diffstat (limited to 'library/std/src/sys_common')
-rw-r--r--library/std/src/sys_common/process.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/library/std/src/sys_common/process.rs b/library/std/src/sys_common/process.rs
index 18883048dae..4d295cf0f09 100644
--- a/library/std/src/sys_common/process.rs
+++ b/library/std/src/sys_common/process.rs
@@ -80,6 +80,10 @@ impl CommandEnv {
         self.vars.clear();
     }
 
+    pub fn does_clear(&self) -> bool {
+        self.clear
+    }
+
     pub fn have_changed_path(&self) -> bool {
         self.saw_path || self.clear
     }