Skip to content

Commit 21381e5

Browse files
committed
Look for autoload in other places
1 parent 9d96e1c commit 21381e5

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

sweet-qa

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
11
#!/usr/bin/env php
22
<?php
33
chdir(__DIR__);
4-
require_once 'vendor/autoload.php';
4+
if (file_exists('../../autoload.php')) {
5+
require_once '../../autoload.php';
6+
} elseif (file_exists('../vendor/autoload.php')) {
7+
require_once '../vendor/autoload.php';
8+
} elseif (file_exists('vendor/autoload.php')) {
9+
require_once 'vendor/autoload.php';
10+
} else {
11+
throw new \RuntimeException('Could not find the autoloader.');
12+
}
513

614
use Symfony\Component\Console\Application;
715
use Twogether\SweetQA\Command as Commands;

0 commit comments

Comments
 (0)