Showing the changes to git-command/src (1 of 1 file). Show all
Unified · Split
| @@ -91,15 +91,15 @@ mod prepare { · 90 unmodified lines | ||
| 91 | 91 | /// |
| 92 | 92 | /// Note that the default IO is configured for typical API usage, that is |
| 93 | 93 | /// |
| 94 | −/// - `stdin` is null | |
| 95 | −/// - `stdout` is captured. | |
| 96 | −/// - `stderr` is null | |
| 94 | +/// - `stdin` is null to prevent blocking unexpectedly on consumption of stdin | |
| 95 | +/// - `stdout` is captured for consumption by the caller | |
| 96 | +/// - `stderr` is inherited to allow the command to provide context to the user | |
| 97 | 97 | pub fn prepare(cmd: impl Into<OsString>) -> Prepare { |
| 98 | 98 | Prepare { |
| 99 | 99 | command: cmd.into(), |
| 100 | 100 | stdin: std::process::Stdio::null(), |
| 101 | 101 | stdout: std::process::Stdio::piped(), |
| 102 | − stderr: std::process::Stdio::null(), | |
| 102 | + stderr: std::process::Stdio::inherit(), | |
| 103 | 103 | args: Vec::new(), |
| 104 | 104 | use_shell: false, |
| 105 | 105 | } |