refactor: created a single install_builtins free function to remove from Config::init

This commit is contained in:
Dark-Alex-17 committed 2026-04-19 17:54:50 -06:00
1 parent cf60e090a5
commit 83de60f59c
7 files changed
+186 -21

No files matched your search

+1 -3
View File
@@ -192,7 +192,7 @@ pub struct Functions {
}
impl Functions {
fn install_global_tools() -> Result<()> {
pub fn install_builtin_global_tools() -> Result<()> {
info!(
"Installing global built-in functions in {}",
paths::functions_dir().display()
@@ -241,7 +241,6 @@ impl Functions {
}
pub fn init(visible_tools: &[String]) -> Result<Self> {
Self::install_global_tools()?;
Self::clear_global_functions_bin_dir()?;
let declarations = Self {
@@ -258,7 +257,6 @@ impl Functions {
}
pub fn init_agent(name: &str, global_tools: &[String]) -> Result<Self> {
Self::install_global_tools()?;
Self::clear_agent_bin_dir(name)?;
let global_tools_declarations = if !global_tools.is_empty() {