Skip to content
This repository has been archived by the owner on Jul 13, 2021. It is now read-only.

Commit

Permalink
use DIRECTORY_SEPARATOR & PATH_SEPARATOR
Browse files Browse the repository at this point in the history
  • Loading branch information
basz committed Jan 30, 2015
1 parent ddb38fb commit bef1242
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/Service/Phing.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,14 @@ protected function getEnv()

$env['PHP_COMMAND'] = $this->options->getPhpBin();
$env['PHING_HOME'] = $this->options->getPhingPath();
$env['PHP_CLASSPATH'] = sprintf('%s\classes', $this->options->getPhingPath());

if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
$env['PATH'] = sprintf('%s;%s\bin', $_SERVER['PATH'], $this->options->getPhingPath());
} else {
$env['PATH'] = sprintf('%s:%s\bin', $_SERVER['PATH'], $this->options->getPhingPath());
}
$env['PHP_CLASSPATH'] = sprintf('%s%sclasses', $this->options->getPhingPath(), DIRECTORY_SEPARATOR);
$env['PATH'] = sprintf(
'%s%s%s%sbin',
$_SERVER['PATH'],
PATH_SEPARATOR,
DIRECTORY_SEPARATOR,
$this->options->getPhingPath()
);

return $env;
}
Expand Down

0 comments on commit bef1242

Please sign in to comment.