aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Guldstrand <andreas.guldstrand@gmail.com>2015-12-16 22:25:34 +0100
committerAndreas Guldstrand <andreas.guldstrand@gmail.com>2015-12-16 22:25:34 +0100
commit24774c8c72888362b4b74304c34d18ca34de1fe5 (patch)
treef43312b59fbe75de0f8e60f54c6f5003ca8bc079
parente37231f1888b5b42ceaec39224aa1c36ae99e3b4 (diff)
downloadsbotools2-24774c8c72888362b4b74304c34d18ca34de1fe5.tar.xz
Let's interpolate @cmd directly
-rwxr-xr-xt/travis.t5
1 files changed, 2 insertions, 3 deletions
diff --git a/t/travis.t b/t/travis.t
index df44cf8..abcd327 100755
--- a/t/travis.t
+++ b/t/travis.t
@@ -25,13 +25,12 @@ sub run {
@_
);
my $cmd = shift @{ $args{cmd} };
- my @args = @{ $args{cmd} };
- my @cmd = ($^X, "-I$lib", "$path/$cmd", @args);
+ my @cmd = ($^X, "-I$lib", "$path/$cmd", @{ $args{cmd} });
my $exit = $args{exit};
my ($output, $return) = capture_merged {
my $ret;
if (defined(my $input = $args{input})) {
- $ret = system(qw/bash -c/, "$^X -I$lib $path/$cmd @args <<END\n$input\nEND\n") && $? >> 8;
+ $ret = system(qw/bash -c/, "@cmd <<END\n$input\nEND\n") && $? >> 8;
}
else {
$ret = system(@cmd) && $? >> 8;