fix(mcp): add back use std::env, use compile-time #[cfg] for locate_mcp_bin
This commit is contained in:
1 parent
7234d9ebd3
commit
3f58526df8
1 file changed
+7
-2
@@ -1,3 +1,4 @@
|
||||
use std::env;
|
||||
use std::path::Path;
|
||||
use std::process::Command;
|
||||
use std::time::Duration;
|
||||
@@ -91,10 +92,14 @@ fn installed_mcp_version() -> Option<String> {
|
||||
}
|
||||
|
||||
fn locate_mcp_bin() -> Option<String> {
|
||||
if cfg!(windows) {
|
||||
#[cfg(windows)]
|
||||
{
|
||||
return locate_windows_command("dbx-mcp-server");
|
||||
}
|
||||
command_stdout("which", &["dbx-mcp-server"]).ok().and_then(first_non_empty_line)
|
||||
#[cfg(not(windows))]
|
||||
{
|
||||
command_stdout("which", &["dbx-mcp-server"]).ok().and_then(first_non_empty_line)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
|
||||
Reference in new issue
Block a user