now passes commands through bash!
This commit is contained in:
parent
9ff5d4b44f
commit
14bf204d35
1 changed files with 6 additions and 8 deletions
14
src/main.rs
14
src/main.rs
|
@ -109,14 +109,12 @@ fn write_injection(s: &str, out: &mut File, inp: &mut File, cfolder: &str) {
|
|||
|
||||
out.write(pre.as_bytes()).unwrap();
|
||||
|
||||
let mut com_iter = com.split(' ');
|
||||
let com = Command::new(com_iter.next().unwrap())
|
||||
.args(
|
||||
com_iter.map(|x| x
|
||||
.replace("$HOME", unsafe { &HOME_DIR })
|
||||
.replace("$CURRENT", cfolder)
|
||||
)
|
||||
)
|
||||
// let mut com_iter = com.split(' ');
|
||||
let com = Command::new("bash")
|
||||
.arg("-c")
|
||||
.arg(com)
|
||||
.env("HOME", unsafe { &HOME_DIR })
|
||||
.env("CURRENT", cfolder)
|
||||
.output();
|
||||
|
||||
let com = match com {
|
||||
|
|
Loading…
Reference in a new issue