From 83ac62b6df7bf20704534d9cb7acb1a6dee616e6 Mon Sep 17 00:00:00 2001 From: Zykino Date: Fri, 10 Feb 2023 22:04:47 +0100 Subject: [PATCH] Do not clear env when launching commands --- src/command.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/command.rs b/src/command.rs index a65b872..9372d3b 100644 --- a/src/command.rs +++ b/src/command.rs @@ -1,7 +1,7 @@ use crate::*; use serde::{Deserialize, Serialize}; use std::collections::HashMap; -use std::io::{stdout, Write}; +use std::io::Write; use std::path::PathBuf; use std::process::{Command, ExitStatus, Stdio}; use std::{fmt, fs, io}; @@ -187,7 +187,7 @@ impl Updater { updater.systems.push(sys); } - eprintln!("{:#?}", updater); + // eprintln!("{:#?}", updater); Ok(updater) } @@ -344,14 +344,13 @@ impl ActualCmd { fn execute(&self, opt: &Opt) -> io::Result { let mut cmd = Command::new(&self.exe); - cmd.args(&self.params).env_clear().envs(&self.env); + cmd.args(&self.params).envs(&self.env); if let Some(cdir) = &self.current_dir { cmd.current_dir(std::fs::canonicalize(cdir)?); } print!("Executing: {}", self); - stdout().flush()?; if opt.quiet { // FIXME: stdin does not work with sudo?