Skip to content

Commit

Permalink
Merge pull request #88 from remicollet/issue-75852
Browse files Browse the repository at this point in the history
Only add bin_dir to PATH if not already there
  • Loading branch information
ashnazg authored Mar 13, 2019
2 parents 01a1050 + 203b4a3 commit 63b7325
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion PEAR/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,9 @@ function build($descfile, $callback = null)

$dir = getcwd();
$this->log(2, "building in $dir");
putenv('PATH=' . $this->config->get('bin_dir') . ':' . getenv('PATH'));
if (!preg_match('@(^|:)' . $this->config->get('bin_dir') . '(:|$)@', getenv('PATH'))) {
putenv('PATH=' . $this->config->get('bin_dir') . ':' . getenv('PATH'));
}
$err = $this->_runCommand($this->config->get('php_prefix')
. "phpize" .
$this->config->get('php_suffix'),
Expand Down

0 comments on commit 63b7325

Please sign in to comment.