mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
Get root path from already available and correct path of autoloader
This commit is contained in:
5
bin/pest
5
bin/pest
@ -19,13 +19,16 @@ use Symfony\Component\Console\Output\OutputInterface;
|
|||||||
|
|
||||||
if (file_exists($vendorPath)) {
|
if (file_exists($vendorPath)) {
|
||||||
include_once $vendorPath;
|
include_once $vendorPath;
|
||||||
|
$rootPath = dirname($vendorPath, 2);
|
||||||
} else {
|
} else {
|
||||||
include_once $localPath;
|
include_once $localPath;
|
||||||
|
$rootPath = dirname($localPath, 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
(new Provider())->register();
|
(new Provider())->register();
|
||||||
|
|
||||||
$rootPath = getcwd();
|
// fallback in case we couldn't find out the path before.
|
||||||
|
$rootPath = (isset($rootPath) && !empty($rootPath)) ? $rootPath : getcwd();
|
||||||
|
|
||||||
$testSuite = TestSuite::getInstance($rootPath);
|
$testSuite = TestSuite::getInstance($rootPath);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user