File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,17 @@ impl ProjectResolver {
63
63
manifest_file. display( )
64
64
) ;
65
65
}
66
+ // Sanity checks in debug build
67
+ debug_assert ! (
68
+ manifest_file. is_absolute( ) ,
69
+ "manifest_file {} is not absolute" ,
70
+ manifest_file. display( )
71
+ ) ;
72
+ debug_assert ! (
73
+ pyproject_file. is_absolute( ) ,
74
+ "pyproject_file {} is not absolute" ,
75
+ pyproject_file. display( )
76
+ ) ;
66
77
67
78
// Set Cargo manifest path
68
79
cargo_options. manifest_path = Some ( manifest_file. clone ( ) ) ;
@@ -243,9 +254,9 @@ impl ProjectResolver {
243
254
}
244
255
}
245
256
// check Cargo.toml in current directory
246
- let path = PathBuf :: from ( "Cargo.toml" ) ;
257
+ let path = current_dir . join ( "Cargo.toml" ) ;
247
258
if path. exists ( ) {
248
- Ok ( ( path, PathBuf :: from ( PYPROJECT_TOML ) ) )
259
+ Ok ( ( path, current_dir . join ( PYPROJECT_TOML ) ) )
249
260
} else {
250
261
Err ( format_err ! (
251
262
"Can't find {} (in {})" ,
You can’t perform that action at this time.
0 commit comments