diff options
author | Eric Wong <e@80x24.org> | 2019-03-10 21:40:00 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2019-04-04 09:13:58 +0000 |
commit | 55c250a8937ccdd2e600980d5e5812c7267f996e (patch) | |
tree | 363b82daa859745f998cb53afab4956860a1f02c /lib/PublicInbox | |
parent | e1a3462f01d9bedd392545a0cf5f2983602dfa03 (diff) | |
download | public-inbox-55c250a8937ccdd2e600980d5e5812c7267f996e.tar.gz |
cgit (and most other CGI executables) is not typically installed for use via $PATH, so we'll need to support absolute paths to run it.
Diffstat (limited to 'lib/PublicInbox')
-rw-r--r-- | lib/PublicInbox/Spawn.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/PublicInbox/Spawn.pm b/lib/PublicInbox/Spawn.pm index 8ea255af..202cfcae 100644 --- a/lib/PublicInbox/Spawn.pm +++ b/lib/PublicInbox/Spawn.pm @@ -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; |