@@ -482,8 +482,10 @@ impl Miri {
482482 String :: new ( )
483483 } else {
484484 builder. verbose ( || println ! ( "running: {cargo:?}" ) ) ;
485- let out =
486- cargo. output ( ) . expect ( "We already ran `cargo miri setup` before and that worked" ) ;
485+ let out = cargo
486+ . command
487+ . output ( )
488+ . expect ( "We already ran `cargo miri setup` before and that worked" ) ;
487489 assert ! ( out. status. success( ) , "`cargo miri setup` returned with non-0 exit code" ) ;
488490 // Output is "<sysroot>\n".
489491 let stdout = String :: from_utf8 ( out. stdout )
@@ -2065,7 +2067,8 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
20652067 cmd. arg ( "--git-repository" ) . arg ( git_config. git_repository ) ;
20662068 cmd. arg ( "--nightly-branch" ) . arg ( git_config. nightly_branch ) ;
20672069
2068- builder. ci_env . force_coloring_in_ci ( & mut cmd) ;
2070+ // FIXME: Move CiEnv back to bootstrap, it is only used here anyway
2071+ builder. ci_env . force_coloring_in_ci ( & mut cmd. command ) ;
20692072
20702073 #[ cfg( feature = "build-metrics" ) ]
20712074 builder. metrics . begin_test_suite (
@@ -2424,7 +2427,7 @@ impl Step for CrateLibrustc {
24242427/// Returns whether the test succeeded.
24252428#[ allow( clippy:: too_many_arguments) ] // FIXME: reduce the number of args and remove this.
24262429fn run_cargo_test < ' a > (
2427- cargo : impl Into < Command > ,
2430+ cargo : impl Into < BootstrapCommand > ,
24282431 libtest_args : & [ & str ] ,
24292432 crates : & [ String ] ,
24302433 primary_crate : & str ,
@@ -2455,14 +2458,14 @@ fn run_cargo_test<'a>(
24552458
24562459/// Given a `cargo test` subcommand, pass it the appropriate test flags given a `builder`.
24572460fn prepare_cargo_test (
2458- cargo : impl Into < Command > ,
2461+ cargo : impl Into < BootstrapCommand > ,
24592462 libtest_args : & [ & str ] ,
24602463 crates : & [ String ] ,
24612464 primary_crate : & str ,
24622465 compiler : Compiler ,
24632466 target : TargetSelection ,
24642467 builder : & Builder < ' _ > ,
2465- ) -> Command {
2468+ ) -> BootstrapCommand {
24662469 let mut cargo = cargo. into ( ) ;
24672470
24682471 // Propegate `--bless` if it has not already been set/unset
@@ -2978,17 +2981,17 @@ impl Step for Bootstrap {
29782981 // Some tests require cargo submodule to be present.
29792982 builder. build . update_submodule ( Path :: new ( "src/tools/cargo" ) ) ;
29802983
2981- let mut check_bootstrap = Command :: new ( builder. python ( ) ) ;
2984+ let mut check_bootstrap = BootstrapCommand :: new ( builder. python ( ) ) ;
29822985 check_bootstrap
29832986 . args ( [ "-m" , "unittest" , "bootstrap_test.py" ] )
29842987 . env ( "BUILD_DIR" , & builder. out )
29852988 . env ( "BUILD_PLATFORM" , builder. build . build . triple )
29862989 . current_dir ( builder. src . join ( "src/bootstrap/" ) ) ;
29872990 // NOTE: we intentionally don't pass test_args here because the args for unittest and cargo test are mutually incompatible.
29882991 // Use `python -m unittest` manually if you want to pass arguments.
2989- builder. run ( BootstrapCommand :: from ( & mut check_bootstrap) . delay_failure ( ) ) ;
2992+ builder. run ( check_bootstrap. delay_failure ( ) ) ;
29902993
2991- let mut cmd = Command :: new ( & builder. initial_cargo ) ;
2994+ let mut cmd = BootstrapCommand :: new ( & builder. initial_cargo ) ;
29922995 cmd. arg ( "test" )
29932996 . args ( [ "--features" , "bootstrap-self-test" ] )
29942997 . current_dir ( builder. src . join ( "src/bootstrap" ) )
0 commit comments