浏览代码

fix: add target os linux

GyDi 2 年之前
父节点
当前提交
52658886e7
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src-tauri/src/cmds.rs

+ 2 - 2
src-tauri/src/cmds.rs

@@ -177,10 +177,10 @@ pub async fn restart_sidecar() -> CmdResult {
 
 #[tauri::command]
 pub fn grant_permission(core: String) -> CmdResult {
-    #[cfg(target_os = "macos")]
+    #[cfg(any(target_os = "macos", target_os = "linux"))]
     return wrap_err!(manager::grant_permission(core));
 
-    #[cfg(not(target_os = "macos"))]
+    #[cfg(not(any(target_os = "macos", target_os = "linux")))]
     return Err("Unsupported target".into());
 }