From 9b8e46bbd41563bdf6e0f6585f65b49dc6fd2ecc Mon Sep 17 00:00:00 2001 From: Christian A. Weber Date: Tue, 14 Jan 2014 19:32:29 +0100 Subject: support varargs and arrays in it::cdist() --- it.class | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/it.class b/it.class index c09a235..bd024a2 100644 --- a/it.class +++ b/it.class @@ -633,7 +633,10 @@ static function cexec(/* $cmd, $values1 = array(), ... */) */ static function cdist(/* $file1, ... */) { - return it::exec('cdist {FILES}', 'FILES' => func_get_args()); + foreach (func_get_args() as $arg) + $files = array_merge((array)$files, (array)$arg); + + return it::exec('cdist {FILES}', 'FILES' => $files); } -- cgit v1.2.3