Skip to content
This repository has been archived by the owner on Jul 1, 2023. It is now read-only.

Commit

Permalink
Fixed autoload path
Browse files Browse the repository at this point in the history
  • Loading branch information
JakubOnderka committed Nov 23, 2013
1 parent a1f84f1 commit 501b5b9
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions parallel-lint.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,27 @@ function showOptions()
exit;
}

require_once __DIR__ . '/vendor/autoload.php';
$files = array(
__DIR__ . '/../../autoload.php',
__DIR__ . '/vendor/autoload.php'
);

$autoloadFileFound = false;
foreach ($files as $file) {
if (file_exists($file)) {
require $file;
$autoloadFileFound = true;
break;
}
}

if (!$autoloadFileFound) {
die(
'You need to set up the project dependencies using the following commands:' . PHP_EOL .
'curl -s http://getcomposer.org/installer | php' . PHP_EOL .
'php composer.phar install' . PHP_EOL
);
}

try {
$manager = new PhpParallelLint\Manager;
Expand All @@ -53,4 +73,4 @@ function showOptions()
} catch (Exception $e) {
echo $e->getMessage(), PHP_EOL;
die(FAILED);
}
}

0 comments on commit 501b5b9

Please sign in to comment.