Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test running drupal-check via global installation #50

Merged
merged 5 commits into from
Apr 27, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Update autoloader path if the package is installed globally.
  • Loading branch information
Sergey-Orlov committed Apr 25, 2019
commit aaa777996bd2e56e42db8ab59a129ad80253f8f6
10 changes: 6 additions & 4 deletions drupal-check
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ use Composer\XdebugHandler\XdebugHandler;

gc_disable();

$composerAutoloadFile = __DIR__ . '/vendor/autoload.php';
if (file_exists($composerAutoloadFile)) {
require $composerAutoloadFile;
} else {
if (file_exists(__DIR__ . '/vendor/autoload.php')) {
require __DIR__ . '/vendor/autoload.php';
} elseif (is_file(__DIR__ . '/../../autoload.php')) {
require_once __DIR__ . '/../../autoload.php';
}
else {
echo "Composer autoload file not found.\n";
echo "You need to run 'composer install'.\n";
exit(1);
Expand Down