Skip to content

Commit be12e86

Browse files
committed
make exec command only exist on unix
1 parent 02763aa commit be12e86

3 files changed

Lines changed: 4 additions & 0 deletions

File tree

coman/src/cli.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ pub enum CliCommands {
6363
#[clap(value_enum)]
6464
generator: Shell,
6565
},
66+
#[cfg(target_family = "unix")]
6667
#[clap(about = "Execute a process/command through coman, with additional monitoring and side processes")]
6768
Exec {
6869
#[clap(trailing_var_arg = true, help = "The command to run", value_hint=ValueHint::Other)]

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},
@@ -291,6 +292,7 @@ async fn upload_chunk(path: PathBuf, offset: u64, size: u64, url: Url) -> Result
291292
Ok(resp.headers()["etag"].to_str()?.to_owned())
292293
}
293294

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

coman/src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ async fn main() -> Result<()> {
135135
},
136136
},
137137
cli::CliCommands::Init { destination, name } => Config::create_project_config(destination, name)?,
138+
#[cfg(target_family = "unix")]
138139
cli::CliCommands::Exec { command } => cli_exec_command(command).await?,
139140
},
140141
None => run_tui(args.tick_rate)?,

0 commit comments

Comments
 (0)