about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorJakub Beránek <berykubik@gmail.com>2024-06-22 09:48:56 +0200
committerJakub Beránek <berykubik@gmail.com>2024-06-28 12:42:52 +0200
commit31911e5ccf0bc364c267cb1d99f1fe06efc04009 (patch)
tree0f4d6dab578f17b483ce576ec79807d2469ad8b1 /src/bootstrap
parentcf5bbb3a0859c5e1854a1110b95fe25994fb091a (diff)
downloadrust-31911e5ccf0bc364c267cb1d99f1fe06efc04009.tar.gz
rust-31911e5ccf0bc364c267cb1d99f1fe06efc04009.zip
Improve documentation of `BootstrapCommand`
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/src/utils/exec.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/bootstrap/src/utils/exec.rs b/src/bootstrap/src/utils/exec.rs
index e8c588b75b3..24659511614 100644
--- a/src/bootstrap/src/utils/exec.rs
+++ b/src/bootstrap/src/utils/exec.rs
@@ -24,6 +24,18 @@ pub enum OutputMode {
 }
 
 /// Wrapper around `std::process::Command`.
+///
+/// By default, the command will exit bootstrap if it fails.
+/// If you want to allow failures, use [allow_failure].
+/// If you want to delay failures until the end of bootstrap, use [delay_failure].
+///
+/// By default, the command will print its stdout/stderr to stdout/stderr of bootstrap
+/// ([OutputMode::OnlyOutput]). If bootstrap uses verbose mode, then it will also print the
+/// command itself in case of failure ([OutputMode::All]).
+/// If you want to handle the output programmatically, use `output_mode(OutputMode::OnlyOnFailure)`.
+///
+/// [allow_failure]: BootstrapCommand::allow_failure
+/// [delay_failure]: BootstrapCommand::delay_failure
 #[derive(Debug)]
 pub struct BootstrapCommand<'a> {
     pub command: &'a mut Command,