Use user_display for source tree error (#2768)

This commit is contained in:
Charlie Marsh 2024-04-01 20:42:11 -04:00 committed by GitHub
parent ccd457a37e
commit b73cfbb0de
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -11,6 +11,7 @@ use distribution_types::{BuildableSource, PackageId, PathSourceUrl, SourceUrl};
use pep508_rs::Requirement; use pep508_rs::Requirement;
use uv_client::RegistryClient; use uv_client::RegistryClient;
use uv_distribution::{DistributionDatabase, Reporter}; use uv_distribution::{DistributionDatabase, Reporter};
use uv_fs::Simplified;
use uv_resolver::InMemoryIndex; use uv_resolver::InMemoryIndex;
use uv_types::BuildContext; use uv_types::BuildContext;
@ -73,7 +74,7 @@ impl<'a, Context: BuildContext + Send + Sync> SourceTreeResolver<'a, Context> {
let path = fs_err::canonicalize(source_tree).with_context(|| { let path = fs_err::canonicalize(source_tree).with_context(|| {
format!( format!(
"Failed to canonicalize path to source tree: {}", "Failed to canonicalize path to source tree: {}",
source_tree.display() source_tree.user_display()
) )
})?; })?;
let Ok(url) = Url::from_directory_path(&path) else { let Ok(url) = Url::from_directory_path(&path) else {