File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
crates/chat-cli/src/mcp_client Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,10 @@ use crate::cli::chat::tools::custom_tool::{
6060 TransportType ,
6161} ;
6262use crate :: os:: Os ;
63- use crate :: util:: directories:: DirectoryError ;
63+ use crate :: util:: directories:: {
64+ DirectoryError ,
65+ canonicalizes_path,
66+ } ;
6467
6568/// Fetches all pages of specified resources from a server
6669macro_rules! paginated_fetch {
@@ -504,7 +507,8 @@ impl McpClientService {
504507
505508 match transport_type {
506509 TransportType :: Stdio => {
507- let command = Command :: new ( command_as_str) . configure ( |cmd| {
510+ let expanded_cmd = canonicalizes_path ( os, command_as_str) ?;
511+ let command = Command :: new ( expanded_cmd) . configure ( |cmd| {
508512 if let Some ( envs) = config_envs {
509513 process_env_vars ( envs, & os. env ) ;
510514 cmd. envs ( envs) ;
You can’t perform that action at this time.
0 commit comments