Skip to content

Commit

Permalink
fix(util.path): expand . to cwd
Browse files Browse the repository at this point in the history
  • Loading branch information
adhocore committed Aug 25, 2018
1 parent 6ce702e commit c1eba08
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Util/Path.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,10 @@ public function loadClasses(array $inPaths, array $namespaces, string $ext = 'ph

public function expand(string $path, string $from = ''): string
{
if ($path === '.') {
return $from;
}

if ($path[0] === '~') {
return \str_replace('~', \getenv('HOME'), $path);
}
Expand Down

0 comments on commit c1eba08

Please sign in to comment.