diff --git a/core/tauri/src/endpoints/shell.rs b/core/tauri/src/endpoints/shell.rs index 1e122261d..ffcf5f30a 100644 --- a/core/tauri/src/endpoints/shell.rs +++ b/core/tauri/src/endpoints/shell.rs @@ -4,7 +4,7 @@ use super::InvokeContext; use crate::{api::ipc::CallbackFn, Runtime}; -#[cfg(shell_execute)] +#[cfg(shell_scope)] use crate::{Manager, Scopes}; use serde::Deserialize; use tauri_macros::{module_command_handler, CommandModule}; @@ -14,15 +14,15 @@ use crate::ExecuteArgs; #[cfg(not(shell_scope))] type ExecuteArgs = (); -#[cfg(shell_execute)] +#[cfg(any(shell_execute, shell_sidecar))] use std::sync::{Arc, Mutex}; use std::{collections::HashMap, path::PathBuf}; type ChildId = u32; -#[cfg(shell_execute)] +#[cfg(any(shell_execute, shell_sidecar))] type ChildStore = Arc>>; -#[cfg(shell_execute)] +#[cfg(any(shell_execute, shell_sidecar))] fn command_childs() -> &'static ChildStore { use once_cell::sync::Lazy; static STORE: Lazy = Lazy::new(Default::default); diff --git a/core/tauri/src/scope/shell.rs b/core/tauri/src/scope/shell.rs index ddf05fe61..01f3ce4f9 100644 --- a/core/tauri/src/scope/shell.rs +++ b/core/tauri/src/scope/shell.rs @@ -166,7 +166,7 @@ pub enum ScopeError { MissingVar(String), /// At least one argument did not pass input validation. - #[cfg(any(shell_execute, shell_open))] + #[cfg(shell_scope)] #[cfg_attr( doc_cfg, doc(cfg(any(feature = "shell-execute", feature = "shell-open"))) @@ -193,7 +193,7 @@ pub enum ScopeError { InvalidInput(String), /// A generic IO error that occurs while executing specified shell commands. - #[cfg(any(shell_execute, shell_sidecar))] + #[cfg(shell_scope)] #[cfg_attr( doc_cfg, doc(cfg(any(feature = "shell-execute", feature = "shell-sidecar")))