Canonicalize virtualenv path once (#678)

This avoids filesystem calls when creating a `BuildDispatch`.

Co-authored-by: konsti <konstin@mailbox.org>
This commit is contained in:
Charlie Marsh
2023-12-18 09:42:58 -05:00
committed by GitHub
parent 89ca0d68b9
commit 74ca9128b4
7 changed files with 8 additions and 9 deletions
+2 -2
View File
@@ -5,7 +5,7 @@ use anstream::println;
use anyhow::{Context, Result};
use chrono::{DateTime, Utc};
use clap::{Parser, ValueEnum};
use fs_err as fs;
use fs_err::File;
use itertools::Itertools;
use petgraph::dot::{Config as DotConfig, Dot};
@@ -55,7 +55,7 @@ pub(crate) async fn resolve_cli(args: ResolveCliArgs) -> Result<()> {
client.clone(),
cache.clone(),
venv.interpreter().clone(),
fs::canonicalize(venv.python_executable())?,
venv.python_executable(),
args.no_build,
IndexUrls::default(),
);