Skip to content

[WIP] Implement pipeline constructor from exec vector #34

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "subprocess"
version = "0.2.5"
version = "0.2.7"
authors = ["Hrvoje Nikšić <hniksic@gmail.com>"]
readme = "README.md"
keywords = ["execute", "process", "command", "redirect", "pipe"]
Expand Down
11 changes: 11 additions & 0 deletions src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -774,6 +774,17 @@ mod pipeline {
}
}

/// Creates a new pipeline by combining a commands vector.
pub fn from_vec(cmds: Vec<Exec>) -> Pipeline {
Pipeline {
cmds: cmds,
stdin: Redirection::None,
stdout: Redirection::None,
stderr_file: None,
stdin_data: None,
}
}

/// Specifies how to set up the standard input of the first
/// command in the pipeline.
///
Expand Down