diff --git a/src-tauri/src/setup_stanza.rs b/src-tauri/src/setup_stanza.rs index d13fcd9..c4317d4 100644 --- a/src-tauri/src/setup_stanza.rs +++ b/src-tauri/src/setup_stanza.rs @@ -16,18 +16,23 @@ pub async fn check_stanza_installed(state: State<'_, KalbaState>) -> Result(executable: S) -> Command where S: AsRef, { - let cmd = Command::new(executable); - #[cfg(windows)] - { - use std::os::windows::process::CommandExt; - cmd.creation_flags(0x08000000); // CREATE_NO_WINDOW constant - } + let mut cmd = Command::new(executable); + use std::os::windows::process::CommandExt; + cmd.creation_flags(0x08000000); // CREATE_NO_WINDOW constant cmd } +#[cfg(not(target_os = "windows"))] +fn new_command(executable: S) -> Command +where + S: AsRef, +{ + Command::new(executable) +} #[tauri::command] pub async fn setup_stanza(state: State<'_, KalbaState>, window: Window) -> Result<(), KalbaError> {