@@ -1809,10 +1809,6 @@ pub fn run_cargo(
18091809 is_check : bool ,
18101810 rlib_only_metadata : bool ,
18111811) -> Vec < PathBuf > {
1812- if builder. config . dry_run ( ) {
1813- return Vec :: new ( ) ;
1814- }
1815-
18161812 // `target_root_dir` looks like $dir/$target/release
18171813 let target_root_dir = stamp. parent ( ) . unwrap ( ) ;
18181814 // `target_deps_dir` looks like $dir/$target/release/deps
@@ -1919,6 +1915,10 @@ pub fn run_cargo(
19191915 crate :: exit!( 1 ) ;
19201916 }
19211917
1918+ if builder. config . dry_run ( ) {
1919+ return Vec :: new ( ) ;
1920+ }
1921+
19221922 // Ok now we need to actually find all the files listed in `toplevel`. We've
19231923 // got a list of prefix/extensions and we basically just need to find the
19241924 // most recent file in the `deps` folder corresponding to each one.
@@ -1974,9 +1974,6 @@ pub fn stream_cargo(
19741974 cb : & mut dyn FnMut ( CargoMessage < ' _ > ) ,
19751975) -> bool {
19761976 let mut cargo = Command :: from ( cargo) ;
1977- if builder. config . dry_run ( ) {
1978- return true ;
1979- }
19801977 // Instruct Cargo to give us json messages on stdout, critically leaving
19811978 // stderr as piped so we can get those pretty colors.
19821979 let mut message_format = if builder. config . json_output {
@@ -1995,6 +1992,11 @@ pub fn stream_cargo(
19951992 }
19961993
19971994 builder. verbose ( & format ! ( "running: {cargo:?}" ) ) ;
1995+
1996+ if builder. config . dry_run ( ) {
1997+ return true ;
1998+ }
1999+
19982000 let mut child = match cargo. spawn ( ) {
19992001 Ok ( child) => child,
20002002 Err ( e) => panic ! ( "failed to execute command: {cargo:?}\n ERROR: {e}" ) ,
0 commit comments