@@ -211,6 +211,15 @@ impl<'a> BootstrapCommand {
211
211
exec_ctx. as_ref ( ) . start ( self , OutputMode :: Capture , OutputMode :: Print )
212
212
}
213
213
214
+ /// Spawn the command in background, while capturing and returns a handle to stream the output.
215
+ #[ track_caller]
216
+ pub fn stream_capture (
217
+ & ' a mut self ,
218
+ exec_ctx : impl AsRef < ExecutionContext > ,
219
+ ) -> Option < StreamingCommand > {
220
+ exec_ctx. as_ref ( ) . stream ( self , OutputMode :: Capture , OutputMode :: Capture )
221
+ }
222
+
214
223
/// Spawn the command in background, while capturing and returning stdout, and printing stderr.
215
224
/// Returns None in dry-mode
216
225
#[ track_caller]
@@ -223,7 +232,7 @@ impl<'a> BootstrapCommand {
223
232
224
233
/// Mark the command as being executed, disarming the drop bomb.
225
234
/// If this method is not called before the command is dropped, its drop will panic.
226
- fn mark_as_executed ( & mut self ) {
235
+ pub fn mark_as_executed ( & mut self ) {
227
236
self . drop_bomb . defuse ( ) ;
228
237
}
229
238
@@ -625,18 +634,12 @@ impl ExecutionContext {
625
634
exit ! ( 1 ) ;
626
635
}
627
636
628
- <<<<<<< HEAD
629
- pub fn stream< ' a > (
630
- =======
631
637
/// Spawns the command with configured stdout and stderr handling.
632
638
///
633
- /// Returns `None` if in dry-run mode and the command is not allowed to run.
634
- ///
635
- /// Panics if the command fails to spawn.
639
+ /// Returns None if in dry-run mode or Panics if the command fails to spawn.
636
640
pub fn stream (
637
- >>>>>>> c2e83361cec ( add comment to exec)
638
641
& self ,
639
- command : & ' a mut BootstrapCommand ,
642
+ command : & mut BootstrapCommand ,
640
643
stdout : OutputMode ,
641
644
stderr : OutputMode ,
642
645
) -> Option < StreamingCommand > {
0 commit comments