1+ #![ allow( warnings) ]
12//! Command Execution Module
23//!
34//! This module provides a structured way to execute and manage commands efficiently,
@@ -11,7 +12,7 @@ use std::process::{Command, CommandArgs, CommandEnvs, ExitStatus, Output, Stdio}
1112use build_helper:: ci:: CiEnv ;
1213use build_helper:: drop_bomb:: DropBomb ;
1314
14- use crate :: Build ;
15+ use super :: execution_context :: ExecutionContext ;
1516
1617/// What should be done when the command fails.
1718#[ derive( Debug , Copy , Clone ) ]
@@ -143,20 +144,20 @@ impl BootstrapCommand {
143144 /// Run the command, while printing stdout and stderr.
144145 /// Returns true if the command has succeeded.
145146 #[ track_caller]
146- pub fn run ( & mut self , builder : & Build ) -> bool {
147- builder . run ( self , OutputMode :: Print , OutputMode :: Print ) . is_success ( )
147+ pub fn run ( & mut self , execution_context : & ExecutionContext ) -> bool {
148+ execution_context . run ( self , OutputMode :: Print , OutputMode :: Print ) . is_success ( )
148149 }
149150
150151 /// Run the command, while capturing and returning all its output.
151152 #[ track_caller]
152- pub fn run_capture ( & mut self , builder : & Build ) -> CommandOutput {
153- builder . run ( self , OutputMode :: Capture , OutputMode :: Capture )
153+ pub fn run_capture ( & mut self , execution_context : & ExecutionContext ) -> CommandOutput {
154+ execution_context . run ( self , OutputMode :: Capture , OutputMode :: Capture )
154155 }
155156
156157 /// Run the command, while capturing and returning stdout, and printing stderr.
157158 #[ track_caller]
158- pub fn run_capture_stdout ( & mut self , builder : & Build ) -> CommandOutput {
159- builder . run ( self , OutputMode :: Capture , OutputMode :: Print )
159+ pub fn run_capture_stdout ( & mut self , execution_context : & ExecutionContext ) -> CommandOutput {
160+ execution_context . run ( self , OutputMode :: Capture , OutputMode :: Print )
160161 }
161162
162163 /// Provides access to the stdlib Command inside.
0 commit comments