summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--it_pipe.class6
1 files changed, 2 insertions, 4 deletions
diff --git a/it_pipe.class b/it_pipe.class
index 7408f69..611c2ad 100644
--- a/it_pipe.class
+++ b/it_pipe.class
@@ -230,11 +230,9 @@ function lines()
* @param $cmd command to execute, with {foo} for parameters
* @param $args assoc array of arguments, see it::exec
*/
-function pipe(/* $cmd, $args */)
+function pipe($cmd, ...$args)
{
- $args = func_get_args();
- $cmd = call_user_func_array('it::shell_command', $args);
-
+ $cmd = it::shell_command($cmd, ...$args);
$descriptors = array(0 => array("pipe", "r"), 1 => array("pipe", "w"));
$process = proc_open($cmd, $descriptors, $pipes);