Do not clear env when launching commands
This commit is contained in:
parent
2332b75636
commit
83ac62b6df
@ -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<ExitStatus> {
|
||||
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?
|
||||
|
Loading…
Reference in New Issue
Block a user