mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 15:57:21 +01:00
Don't use "reapath" in binary for cross-compatibility
This commit is contained in:
committed by
Dimitrios Karvounaris
parent
20d2d9f3b7
commit
b0c964d4d9
9
bin/pest
9
bin/pest
@ -1,6 +1,7 @@
|
|||||||
#!/usr/bin/env php
|
#!/usr/bin/env php
|
||||||
<?php declare(strict_types=1);
|
<?php declare(strict_types=1);
|
||||||
|
|
||||||
|
use NunoMaduro\Collision\Provider;
|
||||||
use Pest\Actions\ValidatesEnvironment;
|
use Pest\Actions\ValidatesEnvironment;
|
||||||
use Pest\Console\Command;
|
use Pest\Console\Command;
|
||||||
use Pest\TestSuite;
|
use Pest\TestSuite;
|
||||||
@ -8,18 +9,18 @@ use Symfony\Component\Console\Output\ConsoleOutput;
|
|||||||
|
|
||||||
(static function () {
|
(static function () {
|
||||||
// Used when Pest is required using composer.
|
// Used when Pest is required using composer.
|
||||||
$vendorPath = realpath(__DIR__ . '/../../../../vendor/autoload.php');
|
$vendorPath = dirname(__DIR__, 4) . '/vendor/autoload.php';
|
||||||
|
|
||||||
// Used when Pest maintainers are running Pest tests.
|
// Used when Pest maintainers are running Pest tests.
|
||||||
$localPath = realpath(__DIR__ . '/../vendor/autoload.php');
|
$localPath = dirname(__DIR__) . '/vendor/autoload.php';
|
||||||
|
|
||||||
if ($vendorPath) {
|
if (file_exists($vendorPath)) {
|
||||||
include_once $vendorPath;
|
include_once $vendorPath;
|
||||||
} else {
|
} else {
|
||||||
include_once $localPath;
|
include_once $localPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
(new \NunoMaduro\Collision\Provider)->register();
|
(new Provider())->register();
|
||||||
|
|
||||||
$rootPath = getcwd();
|
$rootPath = getcwd();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user