Adding timeout

This commit is contained in:
Your Name 2017-04-02 02:07:52 -04:00
parent 77cc7e8ffa
commit c55e88a37f
2 changed files with 2 additions and 2 deletions

Binary file not shown.

View file

@ -6,7 +6,7 @@ use autodie;
use warnings;
use Data::Dumper;
use List::Util qw/uniq/;
use IPC::Run qw/run/;
use IPC::Run qw/run timeout/;
use Module;
our $perlbrew_env = 'blead';
@ -55,7 +55,7 @@ sub run_cpanm {
my @cmd = (qw/perlbrew exec --with/, $perlbrew_env, qw|cpanm --reinstall --verbose |, $module);
my $out;
run \@cmd, '>&', \$out;
run \@cmd, '>&', \$out, timeout(10*60); # timeout after 10 minutes
my $exitcode = $?;