Skip to content

Commit

Permalink
Fix run any directory,
Browse files Browse the repository at this point in the history
  • Loading branch information
terabytesoftw committed Nov 22, 2023
1 parent 3f7b78c commit 5216463
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion bin/queue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,15 @@ use Symfony\Component\Console\Application;
use Yiisoft\Di\Container;
use Yiisoft\Di\ContainerConfig;

require_once './vendor/autoload.php';
$autoload = $GLOBALS['_composer_autoload_path'] ?? './vendor/autoload.php';

if (!file_exists($autoload)) {
throw new RuntimeException(
'Please run "composer install" in your project root to install the required dependencies.'
);
}

require_once $autoload;

/** @var array $definitions */
$definitions = require_once 'definitions.php';
Expand Down

0 comments on commit 5216463

Please sign in to comment.