fix: swap command executors for Windows and Linux
This commit is contained in:
parent
7f9ea12b6a
commit
135576c5d3
@ -46,15 +46,15 @@ impl super::Action for Exec {
|
|||||||
let mut output: Vec<String> = Vec::new();
|
let mut output: Vec<String> = Vec::new();
|
||||||
|
|
||||||
let mut cmd = if cfg!(target_os = "windows") {
|
let mut cmd = if cfg!(target_os = "windows") {
|
||||||
Command::new("sh")
|
Command::new(r"C:\Windows\System32\cmd.exe")
|
||||||
.arg("-c")
|
.arg("/c")
|
||||||
.arg(self.exec_cmd.clone())
|
.arg(self.exec_cmd.clone())
|
||||||
.stdout(Stdio::piped())
|
.stdout(Stdio::piped())
|
||||||
.stderr(Stdio::piped())
|
.stderr(Stdio::piped())
|
||||||
.spawn()?
|
.spawn()?
|
||||||
} else {
|
} else {
|
||||||
Command::new("cmd.exe")
|
Command::new("sh")
|
||||||
.arg("/c")
|
.arg("-c")
|
||||||
.arg(self.exec_cmd.clone())
|
.arg(self.exec_cmd.clone())
|
||||||
.stdout(Stdio::piped())
|
.stdout(Stdio::piped())
|
||||||
.stderr(Stdio::piped())
|
.stderr(Stdio::piped())
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user