aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaarten Vanraes <alien@mageia.org>2016-02-26 22:20:33 +0100
committerMaarten Vanraes <alien@mageia.org>2016-03-16 00:23:40 +0100
commit109949b6891a3974dbd760b6c2679ee5d2507e7f (patch)
tree99a7991c3962169822373086b000cf4560f7ef57
parent5931f5fd141c1e1f88912f8950d745675d3e54ca (diff)
downloadmanatools-109949b6891a3974dbd760b6c2679ee5d2507e7f.tar
manatools-109949b6891a3974dbd760b6c2679ee5d2507e7f.tar.gz
manatools-109949b6891a3974dbd760b6c2679ee5d2507e7f.tar.bz2
manatools-109949b6891a3974dbd760b6c2679ee5d2507e7f.tar.xz
manatools-109949b6891a3974dbd760b6c2679ee5d2507e7f.zip
RunProgram: remove warning
-rw-r--r--lib/ManaTools/Shared/RunProgram.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ManaTools/Shared/RunProgram.pm b/lib/ManaTools/Shared/RunProgram.pm
index 042f5594..dc8c1fe4 100644
--- a/lib/ManaTools/Shared/RunProgram.pm
+++ b/lib/ManaTools/Shared/RunProgram.pm
@@ -206,8 +206,8 @@ sub raw {
my $real_name = ref($name) ? $name->[0] : $name;
my ($stdout_raw, $stdout_mode, $stderr_raw, $stderr_mode);
- ($stdout_mode, $stdout_raw, @args) = @args if $args[0] =~ /^>>?$/;
- ($stderr_mode, $stderr_raw, @args) = @args if $args[0] =~ /^2>>?$/;
+ ($stdout_mode, $stdout_raw, @args) = @args if scalar(@args) >= 2 && $args[0] =~ /^>>?$/;
+ ($stderr_mode, $stderr_raw, @args) = @args if scalar(@args) >= 2 && $args[0] =~ /^2>>?$/;
my $home;
if ($options->{as_user}) {