chiark / gitweb /
Infra: Support not running out of working tree
[dgit.git] / infra / dgit-repos-policy-debian
index a770c55ec07d40e5858c2c782c41934a6ecab8f1..339081e93987c569783665c10aef56c80dbcb663 100755 (executable)
@@ -86,7 +86,9 @@ our %deliberately;
 sub apiquery ($) {
     my ($subpath) = @_;
     local $/=undef;
-    my $cmd = "$dgitlive/dgit -d$distro \$DGIT_TEST_OPTS";
+    my $dgit = "$dgitlive/dgit";
+    $dgit = "dgit" if !stat_exists $dgit;
+    my $cmd = "$dgit -d$distro \$DGIT_TEST_OPTS";
     $cmd .= " -".("D" x $debuglevel) if $debuglevel;
     $cmd .= " archive-api-query $subpath";
     printdebug "apiquery $cmd\n";