Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ff5663282f |
@ -191,9 +191,9 @@ if ($suc) {
|
||||
function findProjectRoot(string $startDir): ?string
|
||||
{
|
||||
$dir = realpath($startDir);
|
||||
|
||||
if (!$dir) return null;
|
||||
while ($dir && $dir !== dirname($dir)) {
|
||||
if (file_exists($dir . '/composer.json')) {
|
||||
if (is_file($dir . '/vendor/autoload.php')) {
|
||||
return $dir;
|
||||
}
|
||||
$dir = dirname($dir);
|
||||
|
||||
Reference in New Issue
Block a user