File tree Expand file tree Collapse file tree
dynamic_instrumentation/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -228,15 +228,6 @@ fn cargo_wrapper(rustc_wrapper: &Path) -> anyhow::Result<()> {
228228
229229 let cargo = Cargo :: new ( ) ;
230230
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-
240231 // TODO(kkysen) Once we upgrade to 1.62, we can just use `cargo` and not specify `+stable`.
241232 // The problem currently is that `+stable` doesn't work on a resolved `$CARGO`,
242233 // which happens when this runs inside of `cargo test`,
@@ -254,6 +245,15 @@ fn cargo_wrapper(rustc_wrapper: &Path) -> anyhow::Result<()> {
254245 }
255246 } ) ?;
256247
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+
257257 cargo. run ( |cmd| {
258258 add_runtime_feature ( & mut cargo_args) ;
259259 cmd. args ( cargo_args)
You can’t perform that action at this time.
0 commit comments