]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/Spawn.pm
spawn: support absolute paths
[public-inbox.git] / lib / PublicInbox / Spawn.pm
index 8ea255af25caa34e167ea5b1ab522559b468bb7e..202cfcaebee7cba63ccabc68378dd3464754220e 100644 (file)
@@ -166,9 +166,9 @@ unless (defined $vfork_spawn) {
        *pi_fork_exec = *PublicInbox::SpawnPP::pi_fork_exec
 }
 
-# n.b. we never use absolute paths with this
 sub which ($) {
        my ($file) = @_;
+       return $file if index($file, '/') == 0;
        foreach my $p (split(':', $ENV{PATH})) {
                $p .= "/$file";
                return $p if -x $p;