From 135576c5d3186e0dcb4cc232474c626fc373f74e Mon Sep 17 00:00:00 2001 From: Andrew Rioux Date: Tue, 21 Oct 2025 08:19:32 -0400 Subject: [PATCH] fix: swap command executors for Windows and Linux --- sparse-actions/src/actions/exec.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sparse-actions/src/actions/exec.rs b/sparse-actions/src/actions/exec.rs index 95a5ff8..7836efc 100644 --- a/sparse-actions/src/actions/exec.rs +++ b/sparse-actions/src/actions/exec.rs @@ -46,15 +46,15 @@ impl super::Action for Exec { let mut output: Vec = 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())