File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ required-features = ["rustc_tests"]
3434
3535[dependencies ]
3636byteorder = { version = " 1.1" , features = [" i128" ]}
37- cargo_metadata = { version = " 0.6 " , optional = true }
37+ cargo_metadata = { version = " 0.7 " , optional = true }
3838directories = { version = " 1.0" , optional = true }
3939rustc_version = { version = " 0.2.3" , optional = true }
4040env_logger = " 0.6"
Original file line number Diff line number Diff line change @@ -83,10 +83,11 @@ fn list_targets() -> impl Iterator<Item=cargo_metadata::Target> {
8383 Path :: new ( & m) . canonicalize ( ) . unwrap ( )
8484 ) ;
8585
86- let mut metadata = if let Ok ( metadata) = cargo_metadata:: metadata (
87- manifest_path. as_ref ( ) . map ( AsRef :: as_ref) ,
88- )
89- {
86+ let mut cmd = cargo_metadata:: MetadataCommand :: new ( ) ;
87+ if let Some ( ref manifest_path) = manifest_path {
88+ cmd. manifest_path ( manifest_path) ;
89+ }
90+ let mut metadata = if let Ok ( metadata) = cmd. exec ( ) {
9091 metadata
9192 } else {
9293 show_error ( format ! ( "Could not obtain Cargo metadata" ) ) ;
You can’t perform that action at this time.
0 commit comments