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();
|
out.write(pre.as_bytes()).unwrap();
|
||||||
|
|
||||||
let mut com_iter = com.split(' ');
|
// let mut com_iter = com.split(' ');
|
||||||
let com = Command::new(com_iter.next().unwrap())
|
let com = Command::new("bash")
|
||||||
.args(
|
.arg("-c")
|
||||||
com_iter.map(|x| x
|
.arg(com)
|
||||||
.replace("$HOME", unsafe { &HOME_DIR })
|
.env("HOME", unsafe { &HOME_DIR })
|
||||||
.replace("$CURRENT", cfolder)
|
.env("CURRENT", cfolder)
|
||||||
)
|
|
||||||
)
|
|
||||||
.output();
|
.output();
|
||||||
|
|
||||||
let com = match com {
|
let com = match com {
|
||||||
|
|
Loading…
Reference in a new issue