Skip to content

Commit 9155e95

Browse files
committed
make exec command only exist on unix
1 parent 7c2696a commit 9155e95

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

coman/src/cli.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ pub enum CliCommands {
2929
#[clap(help = "Destination folder to create config in (default = current directory)")]
3030
destination: Option<PathBuf>,
3131
},
32+
#[cfg(target_family = "unix")]
3233
#[clap(about = "Execute a process/command through coman, with additional monitoring and side processes")]
3334
Exec {
3435
#[clap(trailing_var_arg = true, help = "The command to run")]

coman/src/cscs/cli.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ use std::{
88
use color_eyre::{Result, eyre::Context};
99
use eyre::eyre;
1010
use futures::StreamExt;
11+
#[cfg(target_family = "unix")]
1112
use horust::{
1213
Horust,
1314
horust::formats::{Environment, Service},
@@ -310,6 +311,7 @@ async fn upload_chunk(path: PathBuf, offset: u64, size: u64, url: Url) -> Result
310311
Ok(resp.headers()["etag"].to_str()?.to_owned())
311312
}
312313

314+
#[cfg(target_family = "unix")]
313315
pub(crate) async fn cli_exec_command(command: Vec<String>) -> Result<()> {
314316
let uds_dir = tempdir::TempDir::new("coman_horus")?;
315317
let services = vec![

coman/src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ async fn main() -> Result<()> {
112112
},
113113
},
114114
cli::CliCommands::Init { destination } => Config::create_config(destination)?,
115+
#[cfg(target_family = "unix")]
115116
cli::CliCommands::Exec { command } => cli_exec_command(command).await?,
116117
},
117118
None => run_tui(args.tick_rate)?,

0 commit comments

Comments
 (0)