File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
dynamic_instrumentation/src Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -228,15 +228,6 @@ fn cargo_wrapper(rustc_wrapper: &Path) -> anyhow::Result<()> {
228
228
229
229
let cargo = Cargo :: new ( ) ;
230
230
231
- let cargo_metadata = cargo. metadata ( ) . exec ( ) ?;
232
- let root_package = cargo_metadata
233
- . root_package ( )
234
- . ok_or_else ( || anyhow ! ( "no root package found by `cargo`" ) ) ?;
235
-
236
- cargo. run ( |cmd| {
237
- cmd. args ( & [ "clean" , "--package" , root_package. name . as_str ( ) ] ) ;
238
- } ) ?;
239
-
240
231
// TODO(kkysen) Once we upgrade to 1.62, we can just use `cargo` and not specify `+stable`.
241
232
// The problem currently is that `+stable` doesn't work on a resolved `$CARGO`,
242
233
// which happens when this runs inside of `cargo test`,
@@ -254,6 +245,15 @@ fn cargo_wrapper(rustc_wrapper: &Path) -> anyhow::Result<()> {
254
245
}
255
246
} ) ?;
256
247
248
+ let cargo_metadata = cargo. metadata ( ) . exec ( ) ?;
249
+ let root_package = cargo_metadata
250
+ . root_package ( )
251
+ . ok_or_else ( || anyhow ! ( "no root package found by `cargo`" ) ) ?;
252
+
253
+ cargo. run ( |cmd| {
254
+ cmd. args ( & [ "clean" , "--package" , root_package. name . as_str ( ) ] ) ;
255
+ } ) ?;
256
+
257
257
cargo. run ( |cmd| {
258
258
add_runtime_feature ( & mut cargo_args) ;
259
259
cmd. args ( cargo_args)
You can’t perform that action at this time.
0 commit comments