Configurable search paths (#5356)

This commit is contained in:
Jack Amadeo
2025-10-29 11:34:13 -04:00
committed by GitHub
parent e7ca2e3bf7
commit aaef18217f
6 changed files with 51 additions and 2 deletions
@@ -32,6 +32,7 @@ use super::tool_execution::ToolCallResult;
use crate::agents::extension::{Envs, ProcessExit};
use crate::agents::extension_malware_check;
use crate::agents::mcp_client::{McpClient, McpClientTrait};
use crate::config::search_path::search_path_var;
use crate::config::{get_all_extensions, Config};
use crate::oauth::oauth_flow;
use crate::prompt_template;
@@ -182,6 +183,12 @@ async fn child_process_client(
command.process_group(0);
#[cfg(windows)]
command.creation_flags(CREATE_NO_WINDOW_FLAG);
command.env(
"PATH",
search_path_var().map_err(|e| ExtensionError::ConfigError(format!("{}", e)))?,
);
let (transport, mut stderr) = TokioChildProcess::builder(command)
.stderr(Stdio::piped())
.spawn()?;