Skip to content

Commit

Permalink
inject installed packages in environments
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfv committed Oct 14, 2024
1 parent 3067372 commit 7e9a701
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/render/solver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use futures::FutureExt;
use indicatif::{HumanBytes, ProgressBar, ProgressStyle};
use itertools::Itertools;
use rattler::install::{DefaultProgressFormatter, IndicatifReporter, Installer};
use rattler_conda_types::{Channel, MatchSpec, Platform, RepoDataRecord};
use rattler_conda_types::{Channel, MatchSpec, Platform, PrefixRecord, RepoDataRecord};
use rattler_solve::{resolvo::Solver, ChannelPriority, SolveStrategy, SolverImpl, SolverTask};
use url::Url;

Expand Down Expand Up @@ -309,12 +309,15 @@ pub async fn install_packages(
)
})?;

let installed_packages = PrefixRecord::collect_from_prefix(target_prefix)?;

tracing::info!("\nInstalling {name} environment\n");
Installer::new()
.with_download_client(tool_configuration.client.clone())
.with_target_platform(target_platform)
.with_execute_link_scripts(true)
.with_package_cache(tool_configuration.package_cache.clone())
.with_installed_packages(installed_packages)
.with_reporter(
IndicatifReporter::builder()
.with_multi_progress(
Expand Down

0 comments on commit 7e9a701

Please sign in to comment.