debugcmd '+',@_;
$!=0; $?=0;
my $r = system @_;
- die "@_ $? $!" if $r;
+ die (shellquote @_)." $? $!" if $r;
}
sub policyhook {
debugcmd '+',@cmd;
my $r = system @cmd;
die "system: $!" if $r < 0;
- die "hook (@cmd) failed ($?)" if $r & ~($policyallowbits << 8);
- printdebug sprintf "hook (%s) => %#x\n", "@polargs", $r;
+ die "hook (".(shellquote @cmd).") failed ($?)"
+ if $r & ~($policyallowbits << 8);
+ printdebug sprintf "hook (%s) => %#x\n", (shellquote @polargs), $r;
return $r >> 8;
}
if ($ARGV[0] eq '--pre-receive-hook') {
if ($debuglevel) {
$debugprefix.="=";
- printdebug "in stunthook @ARGV\n";
+ printdebug "in stunthook ".(shellquote @ARGV)."\n";
foreach my $k (sort keys %ENV) {
printdebug "$k=$ENV{$k}\n" if $k =~ m/^DGIT/;
}