Skip to content

Commit db4c968

Browse files
author
Greg Bowler
committed
Simplify autoloader requirement
1 parent fd7b93f commit db4c968

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

bin/build

+4-7
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,10 @@ use Gt\Build\Command\RunCommand;
44
use Gt\Cli\Application;
55
use Gt\Cli\Argument\CommandArgumentList;
66

7-
$autoloadLocations = [
8-
__DIR__ . "/../../../autoload.php",
9-
__DIR__ . "/../vendor/autoload.php",
10-
];
11-
foreach($autoloadLocations as $location) {
12-
if(file_exists($location)) {
13-
require($location);
7+
foreach([ __DIR__ . "/../../..", __DIR__ . "/../vendor" ] as $vendor) {
8+
$autoload = "$vendor/autoload.php";
9+
if(file_exists($autoload)) {
10+
require($autoload);
1411
break;
1512
}
1613
}

0 commit comments

Comments
 (0)