File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 1
- #![ deny( rust_2018_idioms) ]
1
+ //! Launch commands very similarly to `std::process::Command`, but with `git` specific capabilities and adjustments.
2
+ #![ deny( rust_2018_idioms, missing_docs) ]
2
3
#![ forbid( unsafe_code) ]
3
4
4
5
use std:: ffi:: OsString ;
5
6
7
+ /// A structure to keep settings to use when invoking a command via [`spawn()`][Prepare::spawn()], after creating it with [`prepare()`].
6
8
pub struct Prepare {
7
9
command : OsString ,
8
10
stdin : std:: process:: Stdio ,
@@ -45,6 +47,7 @@ mod prepare {
45
47
46
48
/// Finalization
47
49
impl Prepare {
50
+ /// Spawn the command as configured.
48
51
pub fn spawn ( self ) -> std:: io:: Result < std:: process:: Child > {
49
52
let mut cmd = if self . use_shell {
50
53
let mut cmd = std:: process:: Command :: new ( if cfg ! ( windows) { "sh" } else { "/bin/sh" } ) ;
You can’t perform that action at this time.
0 commit comments