Skip to content

Commit

Permalink
Merge pull request #1546 from pantheon-systems/windows-directories
Browse files Browse the repository at this point in the history
use DIRECTORY_SEPARATOR
  • Loading branch information
TeslaDethray committed Jan 21, 2017
2 parents a289172 + 092a681 commit 54178cf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Config/DefaultsConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@ protected function getTerminusRoot($current_dir = null)
if (is_null($current_dir)) {
$current_dir = dirname(__DIR__);
}
if (file_exists("$current_dir/composer.json")) {
if (file_exists($current_dir . DIRECTORY_SEPARATOR . 'composer.json')) {
return $current_dir;
}
$dir = explode('/', $current_dir);
$dir = explode(DIRECTORY_SEPARATOR, $current_dir);
array_pop($dir);
if (empty($dir)) {
throw new TerminusException('Could not locate root to set TERMINUS_ROOT.');
}
$dir = implode('/', $dir);
$dir = implode(DIRECTORY_SEPARATOR, $dir);
$root_dir = $this->getTerminusRoot($dir);
return $root_dir;
}
Expand Down

0 comments on commit 54178cf

Please sign in to comment.