Skip to content

Commit d15b0b2

Browse files
author
Greg Bowler
committed
Use canonical paths for Windows compatibility
1 parent 76dd2dc commit d15b0b2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Task.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
namespace Gt\Build;
33

44
use Webmozart\Glob\Glob;
5+
use Webmozart\PathUtil\Path;
56

67
class Task {
78
protected $absolutePath;
@@ -17,7 +18,11 @@ class Task {
1718
public function __construct(string $basePath, string $pathMatch, $details) {
1819
$basePath = $this->expandRelativePath($basePath);
1920
$this->pathMatch = $pathMatch;
20-
$this->absolutePath = $basePath . "/" . $this->pathMatch;
21+
$this->absolutePath = implode(DIRECTORY_SEPARATOR, [
22+
$basePath,
23+
$this->pathMatch,
24+
]);
25+
$this->absolutePath = Path::canonicalize($this->absolutePath);
2126
$this->setDetails($details);
2227
}
2328

0 commit comments

Comments
 (0)