summaryrefslogtreecommitdiffstats
path: root/src/env.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2022-01-09 22:40:24 -0500
committerJesse Luehrs <doy@tozt.net>2022-01-09 22:40:24 -0500
commit973346c5e426d6a1b684d36ba779bf3e8f5b71b1 (patch)
treeaacdc0396a4d9f090b9e3e8bd0261218b7f79900 /src/env.rs
parentf75dda7269a8ac69f16db86c6a7914bbf97a9ddf (diff)
downloadnbsh-973346c5e426d6a1b684d36ba779bf3e8f5b71b1.tar.gz
nbsh-973346c5e426d6a1b684d36ba779bf3e8f5b71b1.zip
update the environment after every pipeline
Diffstat (limited to 'src/env.rs')
-rw-r--r--src/env.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/env.rs b/src/env.rs
index fd9a047..4c461ff 100644
--- a/src/env.rs
+++ b/src/env.rs
@@ -109,7 +109,11 @@ impl Env {
}
}
- pub fn update(&mut self) -> anyhow::Result<()> {
+ pub fn update(
+ &mut self,
+ status: std::process::ExitStatus,
+ ) -> anyhow::Result<()> {
+ self.set_status(status);
self.set_current_dir(std::env::current_dir()?);
self.set_vars(std::env::vars_os());
Ok(())