1
+ #![ allow( warnings) ]
1
2
//! Command Execution Module
2
3
//!
3
4
//! 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}
11
12
use build_helper:: ci:: CiEnv ;
12
13
use build_helper:: drop_bomb:: DropBomb ;
13
14
14
- use crate :: Build ;
15
+ use super :: execution_context :: ExecutionContext ;
15
16
16
17
/// What should be done when the command fails.
17
18
#[ derive( Debug , Copy , Clone ) ]
@@ -143,20 +144,20 @@ impl BootstrapCommand {
143
144
/// Run the command, while printing stdout and stderr.
144
145
/// Returns true if the command has succeeded.
145
146
#[ 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 ( )
148
149
}
149
150
150
151
/// Run the command, while capturing and returning all its output.
151
152
#[ 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 )
154
155
}
155
156
156
157
/// Run the command, while capturing and returning stdout, and printing stderr.
157
158
#[ 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 )
160
161
}
161
162
162
163
/// Provides access to the stdlib Command inside.
0 commit comments