chiark / gitweb /
dgit-repos-policy-debian: Fix mode calculation
[dgit.git] / infra / dgit-repos-server
index 63f9aac081df8284e08c4b8ae9304d4114ab9a8e..ae30eeff20d958693d911d6b5f6a931e5decd1b0 100755 (executable)
@@ -263,7 +263,7 @@ sub runcmd {
     debugcmd '+',@_;
     $!=0; $?=0;
     my $r = system @_;
-    die "@_ $? $!" if $r;
+    die (shellquote @_)." $? $!" if $r;
 }
 
 sub policyhook {
@@ -274,8 +274,9 @@ 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 => %#x\n", $r;
     return $r >> 8;
 }
 
@@ -889,7 +890,7 @@ sub parseargsdispatch () {
     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/;
            }