History

Allow programs to communicate errors by default (#450)

Sebastian Thiel committed 4 years ago

Commit 5a2168e1 parent c1399d11 file · +4 −4Browse files

Showing the changes to git-command/src (1 of 1 file). Show all

Unified · Split

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