@@ -90,7 +90,13 @@ impl ExecutionContext {
9090 command. mark_as_executed ( ) ;
9191
9292 if self . dry_run ( ) && !command. run_always {
93- return DeferredCommand :: new ( None , stdout, stderr, command, Arc :: new ( self . clone ( ) ) ) ;
93+ return DeferredCommand {
94+ process : None ,
95+ stdout,
96+ stderr,
97+ command,
98+ exec_ctx : Arc :: new ( self . clone ( ) ) ,
99+ } ;
94100 }
95101
96102 #[ cfg( feature = "tracing" ) ]
@@ -109,7 +115,13 @@ impl ExecutionContext {
109115
110116 let child = cmd. spawn ( ) . unwrap ( ) ;
111117
112- DeferredCommand :: new ( Some ( child) , stdout, stderr, command, Arc :: new ( self . clone ( ) ) )
118+ DeferredCommand {
119+ process : Some ( child) ,
120+ stdout,
121+ stderr,
122+ command,
123+ exec_ctx : Arc :: new ( self . clone ( ) ) ,
124+ }
113125 }
114126
115127 /// Execute a command and return its output.
@@ -158,16 +170,6 @@ pub struct DeferredCommand<'a> {
158170}
159171
160172impl < ' a > DeferredCommand < ' a > {
161- pub fn new (
162- child : Option < Child > ,
163- stdout : OutputMode ,
164- stderr : OutputMode ,
165- command : & ' a mut BootstrapCommand ,
166- exec_ctx : Arc < ExecutionContext > ,
167- ) -> Self {
168- DeferredCommand { process : child, stdout, stderr, command, exec_ctx }
169- }
170-
171173 pub fn wait_for_output ( mut self ) -> CommandOutput {
172174 if self . process . is_none ( ) {
173175 return CommandOutput :: default ( ) ;
0 commit comments