Skip to content

Commit

Permalink
Use canonical paths for Windows compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
g105b committed Jan 10, 2018
1 parent 76dd2dc commit d15b0b2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Task.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
namespace Gt\Build;

use Webmozart\Glob\Glob;
use Webmozart\PathUtil\Path;

class Task {
protected $absolutePath;
Expand All @@ -17,7 +18,11 @@ class Task {
public function __construct(string $basePath, string $pathMatch, $details) {
$basePath = $this->expandRelativePath($basePath);
$this->pathMatch = $pathMatch;
$this->absolutePath = $basePath . "/" . $this->pathMatch;
$this->absolutePath = implode(DIRECTORY_SEPARATOR, [
$basePath,
$this->pathMatch,
]);
$this->absolutePath = Path::canonicalize($this->absolutePath);
$this->setDetails($details);
}

Expand Down

0 comments on commit d15b0b2

Please sign in to comment.