Skip to content

Commit

Permalink
Added extra location to the autoload location
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelsharman committed Jun 17, 2019
1 parent c92bce3 commit f862066
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion bin/mo
Original file line number Diff line number Diff line change
@@ -1,7 +1,28 @@
#!/usr/bin/env php
<?php

require __DIR__ . '/../../../../vendor/autoload.php';
foreach (
[
__DIR__ . '/../../../../vendor/autoload.php',
__DIR__ . '/../../autoload.php',
__DIR__ . '/../vendor/autoload.php',
__DIR__ . '/vendor/autoload.php'
] as $file
) {
if (file_exists($file)) {
define('AUTOLOAD_PATH', $file);
break;
}
}

unset($file);

if (!defined('AUTOLOAD_PATH')) {
fwrite(STDERR, 'Cannot find the Composer autoloader' . PHP_EOL . PHP_EOL);
die();
}

require_once AUTOLOAD_PATH;

use LearnosityQti\Commands\ConvertToLearnosityCommand;
use LearnosityQti\Commands\ConvertToQtiCommand;
Expand Down

0 comments on commit f862066

Please sign in to comment.