fix composer root path

This commit is contained in:
TomasVotruba 2021-05-04 14:26:21 +02:00
parent ac7a03f800
commit 37e21653d4

View File

@ -131,10 +131,10 @@ function should_include_preload(): bool
return true;
}
if (! file_exists(__DIR__ . '/../composer.json')) {
if (! file_exists(getcwd() . '/composer.json')) {
return false;
}
$composerJsonFileContent = file_get_contents(__DIR__ . '/../composer.json');
$composerJsonFileContent = file_get_contents(getcwd() . '/composer.json');
return strpos($composerJsonFileContent, '"name": "rector/rector"') !== false;
}