fix: MCP server should not spawn shell window (#5223)

* fix: MCP server should not spawn shell window

* Update src-tauri/src/core/mcp.rs

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
This commit is contained in:
Louis 2025-06-09 23:23:34 +07:00 committed by GitHub
parent 6d6790d5e0
commit 891c149f1b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -116,6 +116,9 @@ async fn start_mcp_server<R: Runtime>(
cmd.arg("run");
cmd.env("UV_CACHE_DIR", cache_dir.to_str().unwrap().to_string());
}
#[cfg(windows)] {
cmd.creation_flags(0x08000000); // CREATE_NO_WINDOW: prevents shell window on Windows
}
let app_path_str = app_path.to_str().unwrap().to_string();
let log_file_path = format!("{}/logs/app.log", app_path_str);
match std::fs::OpenOptions::new()