File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -69,15 +69,15 @@ impl<T: AsRef<Path>> Simplified for T {
69
69
return path. display ( ) ;
70
70
}
71
71
72
+ // Attempt to strip the current working directory, then the canonicalized current working
73
+ // directory, in case they differ.
74
+ let path = path. strip_prefix ( CWD . simplified ( ) ) . unwrap_or ( path) ;
75
+
72
76
if path. as_os_str ( ) == "" {
73
77
// Avoid printing an empty string for the current directory
74
78
return Path :: new ( "." ) . display ( ) ;
75
79
}
76
80
77
- // Attempt to strip the current working directory, then the canonicalized current working
78
- // directory, in case they differ.
79
- let path = path. strip_prefix ( CWD . simplified ( ) ) . unwrap_or ( path) ;
80
-
81
81
path. display ( )
82
82
}
83
83
Original file line number Diff line number Diff line change @@ -253,7 +253,7 @@ impl IntoIterator for FlatDependencyGroups {
253
253
#[ derive( Debug , Error ) ]
254
254
#[ error( "{} has malformed dependency groups" , if path. is_empty( ) && package. is_empty( ) {
255
255
"Project" . to_string( )
256
- } else if path. is_empty( ) {
256
+ } else if path. is_empty( ) || path == "." {
257
257
format!( "Project `{package}`" )
258
258
} else if package. is_empty( ) {
259
259
format!( "`{path}`" )
You can’t perform that action at this time.
0 commit comments