@@ -90,7 +90,13 @@ impl ExecutionContext {
90
90
command. mark_as_executed ( ) ;
91
91
92
92
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
+ } ;
94
100
}
95
101
96
102
#[ cfg( feature = "tracing" ) ]
@@ -109,7 +115,13 @@ impl ExecutionContext {
109
115
110
116
let child = cmd. spawn ( ) . unwrap ( ) ;
111
117
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
+ }
113
125
}
114
126
115
127
/// Execute a command and return its output.
@@ -158,16 +170,6 @@ pub struct DeferredCommand<'a> {
158
170
}
159
171
160
172
impl < ' 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
-
171
173
pub fn wait_for_output ( mut self ) -> CommandOutput {
172
174
if self . process . is_none ( ) {
173
175
return CommandOutput :: default ( ) ;
0 commit comments