Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions crates/uv-fs/src/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,15 @@ impl<T: AsRef<Path>> Simplified for T {
return path.display();
}

// Attempt to strip the current working directory, then the canonicalized current working
// directory, in case they differ.
let path = path.strip_prefix(CWD.simplified()).unwrap_or(path);

if path.as_os_str() == "" {
// Avoid printing an empty string for the current directory
return Path::new(".").display();
}

// Attempt to strip the current working directory, then the canonicalized current working
// directory, in case they differ.
let path = path.strip_prefix(CWD.simplified()).unwrap_or(path);

path.display()
}

Expand Down
2 changes: 1 addition & 1 deletion crates/uv-workspace/src/dependency_groups.rs
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ impl IntoIterator for FlatDependencyGroups {
#[derive(Debug, Error)]
#[error("{} has malformed dependency groups", if path.is_empty() && package.is_empty() {
"Project".to_string()
} else if path.is_empty() {
} else if path.is_empty() || path == "." {
format!("Project `{package}`")
} else if package.is_empty() {
format!("`{path}`")
Expand Down
Loading