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 cmd = if cfg!(target_os = "windows") {
|
||||
Command::new("sh")
|
||||
.arg("-c")
|
||||
Command::new(r"C:\Windows\System32\cmd.exe")
|
||||
.arg("/c")
|
||||
.arg(self.exec_cmd.clone())
|
||||
.stdout(Stdio::piped())
|
||||
.stderr(Stdio::piped())
|
||||
.spawn()?
|
||||
} else {
|
||||
Command::new("cmd.exe")
|
||||
.arg("/c")
|
||||
Command::new("sh")
|
||||
.arg("-c")
|
||||
.arg(self.exec_cmd.clone())
|
||||
.stdout(Stdio::piped())
|
||||
.stderr(Stdio::piped())
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user