File tree Expand file tree Collapse file tree 1 file changed +22
-2
lines changed Expand file tree Collapse file tree 1 file changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,27 @@ function showOptions()
3939 exit ;
4040}
4141
42- require_once __DIR__ . '/vendor/autoload.php ' ;
42+ $ files = array (
43+ __DIR__ . '/../../autoload.php ' ,
44+ __DIR__ . '/vendor/autoload.php '
45+ );
46+
47+ $ autoloadFileFound = false ;
48+ foreach ($ files as $ file ) {
49+ if (file_exists ($ file )) {
50+ require $ file ;
51+ $ autoloadFileFound = true ;
52+ break ;
53+ }
54+ }
55+
56+ if (!$ autoloadFileFound ) {
57+ die (
58+ 'You need to set up the project dependencies using the following commands: ' . PHP_EOL .
59+ 'curl -s http://getcomposer.org/installer | php ' . PHP_EOL .
60+ 'php composer.phar install ' . PHP_EOL
61+ );
62+ }
4363
4464try {
4565 $ manager = new PhpParallelLint \Manager ;
@@ -53,4 +73,4 @@ function showOptions()
5373} catch (Exception $ e ) {
5474 echo $ e ->getMessage (), PHP_EOL ;
5575 die (FAILED );
56- }
76+ }
You can’t perform that action at this time.
0 commit comments