Skip to content

Commit

Permalink
ConsoleScript: fixed failed relativization of --make ./
Browse files Browse the repository at this point in the history
./ gets resolved as the current directory path without a trailing /, but the basePath already ends with a / at this point.
  • Loading branch information
dktapps committed Dec 17, 2021
1 parent a7267f6 commit e884a4c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ConsoleScript.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,10 @@ function main() : void{
exit(1);
}

$path = str_replace($basePath, '', $realPath);
if(is_dir($realPath)){
$path = rtrim($path, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;
$realPath = rtrim($realPath, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR;
}
$path = str_replace($basePath, '', $realPath);
});

$includedPaths = array_filter($includedPaths, function(string $v) : bool{
Expand Down

0 comments on commit e884a4c

Please sign in to comment.