diff --git a/src/apps/cli/src/daemon/service.rs b/src/apps/cli/src/daemon/service.rs index 67591c330c..79a4a7dd28 100644 --- a/src/apps/cli/src/daemon/service.rs +++ b/src/apps/cli/src/daemon/service.rs @@ -85,6 +85,7 @@ fn render_launch_agent(executable: &Path) -> String { ) } +#[cfg(unix)] fn run_command(program: &str, args: &[&str]) -> Result { std::process::Command::new(program) .args(args) diff --git a/src/apps/cli/src/dispatch/runner.rs b/src/apps/cli/src/dispatch/runner.rs index 537783eef3..6248ea52b9 100644 --- a/src/apps/cli/src/dispatch/runner.rs +++ b/src/apps/cli/src/dispatch/runner.rs @@ -1,4 +1,5 @@ use std::process::{Command, Stdio}; +#[cfg(unix)] use std::time::Duration; use anyhow::{anyhow, bail, Context, Result}; @@ -334,6 +335,7 @@ fn process_matches_action(_pid: u32, _action: &str, _job_id: &str) -> bool { false } +#[cfg(any(unix, test))] fn arguments_match_action(args: &[String], action: &str, job_id: &str) -> bool { args.windows(4).any(|window| { window[0] == "dispatch"