File tree 2 files changed +6
-5
lines changed
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"]
34
34
35
35
[dependencies ]
36
36
byteorder = { version = " 1.1" , features = [" i128" ]}
37
- cargo_metadata = { version = " 0.6 " , optional = true }
37
+ cargo_metadata = { version = " 0.7 " , optional = true }
38
38
directories = { version = " 1.0" , optional = true }
39
39
rustc_version = { version = " 0.2.3" , optional = true }
40
40
env_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> {
83
83
Path :: new ( & m) . canonicalize ( ) . unwrap ( )
84
84
) ;
85
85
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 ( ) {
90
91
metadata
91
92
} else {
92
93
show_error ( format ! ( "Could not obtain Cargo metadata" ) ) ;
You can’t perform that action at this time.
0 commit comments