@@ -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 )
@@ -2067,7 +2069,8 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
20672069 cmd. arg ( "--git-repository" ) . arg ( git_config. git_repository ) ;
20682070 cmd. arg ( "--nightly-branch" ) . arg ( git_config. nightly_branch ) ;
20692071
2070- builder. ci_env . force_coloring_in_ci ( & mut cmd) ;
2072+ // FIXME: Move CiEnv back to bootstrap, it is only used here anyway
2073+ builder. ci_env . force_coloring_in_ci ( & mut cmd. command ) ;
20712074
20722075 #[ cfg( feature = "build-metrics" ) ]
20732076 builder. metrics . begin_test_suite (
@@ -2426,7 +2429,7 @@ impl Step for CrateLibrustc {
24262429/// Returns whether the test succeeded.
24272430#[ allow( clippy:: too_many_arguments) ] // FIXME: reduce the number of args and remove this.
24282431fn run_cargo_test < ' a > (
2429- cargo : impl Into < Command > ,
2432+ cargo : impl Into < BootstrapCommand > ,
24302433 libtest_args : & [ & str ] ,
24312434 crates : & [ String ] ,
24322435 primary_crate : & str ,
@@ -2457,14 +2460,14 @@ fn run_cargo_test<'a>(
24572460
24582461/// Given a `cargo test` subcommand, pass it the appropriate test flags given a `builder`.
24592462fn prepare_cargo_test (
2460- cargo : impl Into < Command > ,
2463+ cargo : impl Into < BootstrapCommand > ,
24612464 libtest_args : & [ & str ] ,
24622465 crates : & [ String ] ,
24632466 primary_crate : & str ,
24642467 compiler : Compiler ,
24652468 target : TargetSelection ,
24662469 builder : & Builder < ' _ > ,
2467- ) -> Command {
2470+ ) -> BootstrapCommand {
24682471 let mut cargo = cargo. into ( ) ;
24692472
24702473 // Propegate `--bless` if it has not already been set/unset
@@ -2977,17 +2980,17 @@ impl Step for Bootstrap {
29772980 let compiler = builder. compiler ( 0 , host) ;
29782981 let _guard = builder. msg ( Kind :: Test , 0 , "bootstrap" , host, host) ;
29792982
2980- let mut check_bootstrap = Command :: new ( builder. python ( ) ) ;
2983+ let mut check_bootstrap = BootstrapCommand :: new ( builder. python ( ) ) ;
29812984 check_bootstrap
29822985 . args ( [ "-m" , "unittest" , "bootstrap_test.py" ] )
29832986 . env ( "BUILD_DIR" , & builder. out )
29842987 . env ( "BUILD_PLATFORM" , builder. build . build . triple )
29852988 . current_dir ( builder. src . join ( "src/bootstrap/" ) ) ;
29862989 // NOTE: we intentionally don't pass test_args here because the args for unittest and cargo test are mutually incompatible.
29872990 // Use `python -m unittest` manually if you want to pass arguments.
2988- builder. run ( BootstrapCommand :: from ( & mut check_bootstrap) . delay_failure ( ) ) ;
2991+ builder. run ( check_bootstrap. delay_failure ( ) ) ;
29892992
2990- let mut cmd = Command :: new ( & builder. initial_cargo ) ;
2993+ let mut cmd = BootstrapCommand :: new ( & builder. initial_cargo ) ;
29912994 cmd. arg ( "test" )
29922995 . args ( [ "--features" , "bootstrap-self-test" ] )
29932996 . current_dir ( builder. src . join ( "src/bootstrap" ) )
0 commit comments