This is the fix I sent upstream:

https://public-inbox.org/meta/a67340a12b17379ad947f8ac96cd5c0524831741.ca...@hansenpartnership.com/

James

---

diff --git a/lib/PublicInbox/Spawn.pm b/lib/PublicInbox/Spawn.pm
index 1d9f9b76..7f669fc6 100644
--- a/lib/PublicInbox/Spawn.pm
+++ b/lib/PublicInbox/Spawn.pm
@@ -350,7 +350,7 @@ sub which ($) {
        return $file if index($file, '/') >= 0;
        for my $p (split(/:/, $ENV{PATH})) {
                $p .= "/$file";
-               return $p if -x $p;
+               return $p if (-x $p && ! -d $p);
        }
        undef;
 }

Reply via email to