Skip to content

Commit 43e2ac7

Browse files
committed
Improve documentation of BootstrapCommand
1 parent 446c7b9 commit 43e2ac7

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/bootstrap/src/utils/exec.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,18 @@ pub enum OutputMode {
2424
}
2525

2626
/// Wrapper around `std::process::Command`.
27+
///
28+
/// By default, the command will exit bootstrap if it fails.
29+
/// If you want to allow failures, use [allow_failure].
30+
/// If you want to delay failures until the end of bootstrap, use [delay_failure].
31+
///
32+
/// By default, the command will print its stdout/stderr to stdout/stderr of bootstrap
33+
/// ([OutputMode::OnlyOutput]). If bootstrap uses verbose mode, then it will also print the
34+
/// command itself in case of failure ([OutputMode::All]).
35+
/// If you want to handle the output programmatically, use `output_mode(OutputMode::OnlyOnFailure)`.
36+
///
37+
/// [allow_failure]: BootstrapCommand::allow_failure
38+
/// [delay_failure]: BootstrapCommand::delay_failure
2739
#[derive(Debug)]
2840
pub struct BootstrapCommand<'a> {
2941
pub command: &'a mut Command,

0 commit comments

Comments
 (0)