pub struct CommandSpec {
pub program: PathBuf,
pub args: Vec<OsString>,
pub shell: Option<ShellInvocation>,
pub cwd: Option<PathBuf>,
pub env: CommandEnvironment,
pub stdin: CommandStdin,
pub stdout: CommandStdio,
pub stderr: CommandStdio,
}Expand description
Typed description of a subprocess to spawn.
Fields§
§program: PathBufExecutable when not using Self::shell, or sh for shell modes.
SystemCommandRunner runs a bare sh the way Git does: /bin/sh on Unix, and on
Windows the sh of the Git for Windows install that owns git on the child’s PATH
(then sh elsewhere on that PATH), so filters and helpers work when only Git’s
cmd directory is on PATH.
args: Vec<OsString>argv tail when not using shell -c.
shell: Option<ShellInvocation>When set, program is invoked as a shell wrapper per ShellInvocation.
cwd: Option<PathBuf>Process working directory used during repository discovery.
env: CommandEnvironmentEnv for this item.
stdin: CommandStdinStdin for this item.
stdout: CommandStdioStdout for this item.
stderr: CommandStdioStderr for this item.
Implementations§
Source§impl CommandSpec
impl CommandSpec
Sourcepub fn sh_dash_c_filter(script: impl Into<String>) -> Self
pub fn sh_dash_c_filter(script: impl Into<String>) -> Self
sh -c expanded with piped stdin/stdout (one-shot clean/smudge filter).
Trait Implementations§
Source§impl Clone for CommandSpec
impl Clone for CommandSpec
Auto Trait Implementations§
impl Freeze for CommandSpec
impl RefUnwindSafe for CommandSpec
impl Send for CommandSpec
impl Sync for CommandSpec
impl Unpin for CommandSpec
impl UnsafeUnpin for CommandSpec
impl UnwindSafe for CommandSpec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more