commit 24774c8c72888362b4b74304c34d18ca34de1fe5
parent e37231f1888b5b42ceaec39224aa1c36ae99e3b4
Author: Andreas Guldstrand <andreas.guldstrand@gmail.com>
Date: Wed, 16 Dec 2015 22:25:34 +0100
Let's interpolate @cmd directly
Diffstat:
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git 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;