comment
This commit is contained in:
@@ -28,6 +28,8 @@ func (runner *ZRunner) Run(ctx context.Context, command string, formatArgs ...an
|
||||
return cmd.CombinedOutput()
|
||||
}
|
||||
|
||||
// Pipeline accepts a slice of [exec.Cmd] and pipes them together
|
||||
// then returns the result of the final command
|
||||
func Pipeline(cmds ...*exec.Cmd) ([]byte, error) {
|
||||
for i := 0; i < len(cmds)-1; i++ {
|
||||
stdout, err := cmds[i].StdoutPipe()
|
||||
|
||||
Reference in New Issue
Block a user