diff --git a/CHANGELOG.md b/CHANGELOG.md index df3d378f8..d4a8fe47b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,12 @@ - [Rust](https://github.com/moonrepo/rust-plugin/blob/master/CHANGELOG.md) - [TOML schema](https://github.com/moonrepo/schema-plugin/blob/master/CHANGELOG.md) +## Unreleased + +#### 🐞 Fixes + +- Actually fixed `proto use` this time. + ## 0.23.6 #### 🚀 Updates diff --git a/crates/cli/src/commands/install_all.rs b/crates/cli/src/commands/install_all.rs index 0c3e9748a..421d8fe5e 100644 --- a/crates/cli/src/commands/install_all.rs +++ b/crates/cli/src/commands/install_all.rs @@ -6,7 +6,6 @@ use crate::{ commands::install::{internal_install, InstallArgs}, }; use miette::IntoDiagnostic; -use proto_core::load_schema_plugin; use starbase::system; use starbase_styles::color; use std::{env, process}; @@ -54,12 +53,6 @@ pub async fn install_all() { disable_progress_bars(); - // Download the schema plugin before installing tools. - // We must do this here, otherwise when multiple schema - // based tools are installed in parallel, they will - // collide when attempting to download the schema plugin! - load_schema_plugin(&loader.proto, &loader.user_config).await?; - // Then install each tool in parallel! let mut futures = vec![]; diff --git a/crates/cli/src/helpers.rs b/crates/cli/src/helpers.rs index 4bf8957da..f6316e6a6 100644 --- a/crates/cli/src/helpers.rs +++ b/crates/cli/src/helpers.rs @@ -2,8 +2,8 @@ use futures::StreamExt; use indicatif::{ProgressBar, ProgressStyle}; use miette::IntoDiagnostic; use proto_core::{ - get_temp_dir, load_tool_from_locator, Id, ProtoEnvironment, ProtoError, Tool, ToolsConfig, - UserConfig, SCHEMA_PLUGIN_KEY, + get_temp_dir, load_schema_plugin, load_tool_from_locator, Id, ProtoEnvironment, ProtoError, + Tool, ToolsConfig, UserConfig, SCHEMA_PLUGIN_KEY, }; use starbase_utils::fs; use std::cmp; @@ -128,6 +128,12 @@ impl ToolsLoader { plugins.extend(&self.user_config.plugins); plugins.extend(&self.tools_config.plugins); + // Download the schema plugin before loading plugins. + // We must do this here, otherwise when multiple schema + // based tools are installed in parallel, they will + // collide when attempting to download the schema plugin! + load_schema_plugin(&self.proto, &self.user_config).await?; + let mut futures = vec![]; let mut tools = vec![];