my ($name, %args) = @_;
get_logger->trace("Running $name...");
my $basename = fileparse $name, qr/[.][^.]*/s;
- my @args = ('--nobody');
+ my @args = ('--sudo');
push @args, '--no-close' if $ENV{TEST_VERBOSE};
push @args, '--timeout', $args{timeout} if $args{timeout};
push @args, '--mlimit', $args{mlimit} if $args{mlimit};
try {
execlist prog => '--fd=1 >>errors', '--fd=2 >>errors', 'gruntmaster-compile', $format, $name;
} catch {
- die "Compile error\n"
+ my $exmsg = $_->[1];
+ die "Compile error ($exmsg)\n"
} finally {
$Gruntmaster::Daemon::errors .= read_file 'errors';
- $Gruntmaster::Daemon::errors .= "\n";
+ $Gruntmaster::Daemon::errors .= "\n" if -s 'errors';
unlink 'errors';
};
}