@@ -1800,10 +1800,6 @@ pub fn run_cargo(
1800
1800
is_check : bool ,
1801
1801
rlib_only_metadata : bool ,
1802
1802
) -> Vec < PathBuf > {
1803
- if builder. config . dry_run ( ) {
1804
- return Vec :: new ( ) ;
1805
- }
1806
-
1807
1803
// `target_root_dir` looks like $dir/$target/release
1808
1804
let target_root_dir = stamp. parent ( ) . unwrap ( ) ;
1809
1805
// `target_deps_dir` looks like $dir/$target/release/deps
@@ -1910,6 +1906,10 @@ pub fn run_cargo(
1910
1906
crate :: exit!( 1 ) ;
1911
1907
}
1912
1908
1909
+ if builder. config . dry_run ( ) {
1910
+ return Vec :: new ( ) ;
1911
+ }
1912
+
1913
1913
// Ok now we need to actually find all the files listed in `toplevel`. We've
1914
1914
// got a list of prefix/extensions and we basically just need to find the
1915
1915
// most recent file in the `deps` folder corresponding to each one.
@@ -1965,9 +1965,6 @@ pub fn stream_cargo(
1965
1965
cb : & mut dyn FnMut ( CargoMessage < ' _ > ) ,
1966
1966
) -> bool {
1967
1967
let mut cargo = Command :: from ( cargo) ;
1968
- if builder. config . dry_run ( ) {
1969
- return true ;
1970
- }
1971
1968
// Instruct Cargo to give us json messages on stdout, critically leaving
1972
1969
// stderr as piped so we can get those pretty colors.
1973
1970
let mut message_format = if builder. config . json_output {
@@ -1986,6 +1983,11 @@ pub fn stream_cargo(
1986
1983
}
1987
1984
1988
1985
builder. verbose ( & format ! ( "running: {cargo:?}" ) ) ;
1986
+
1987
+ if builder. config . dry_run ( ) {
1988
+ return true ;
1989
+ }
1990
+
1989
1991
let mut child = match cargo. spawn ( ) {
1990
1992
Ok ( child) => child,
1991
1993
Err ( e) => panic ! ( "failed to execute command: {cargo:?}\n ERROR: {e}" ) ,
0 commit comments