fix autoloading

This commit is contained in:
Maxime 2024-04-08 17:18:39 +02:00
parent 027c680dc4
commit 4eae25ab02
1 changed files with 6 additions and 4 deletions

View File

@ -23,10 +23,14 @@ abstract class ProxyCommand extends Command
public function handle()
{
foreach (self::PACKAGES as $package) {
if (! is_dir("{$this->base_path}/packages/$package")) {
$package_path = "{$this->base_path}/packages/$package";
if (! is_dir($package_path)) {
$this->error("🚨 Missing package bag/$package. Please run 'php artisan bag:install' first.");
return 1;
}
require_once $package_path.'/vendor/autoload.php';
}
try {
@ -75,8 +79,6 @@ abstract class ProxyCommand extends Command
$this->info("🐠 Loading bag/$package...");
$result = Process::path($package_path)->run("composer install --ignore-platform-reqs");
require_once $package_path.'/vendor/autoload.php';
$this->info("⚡️ Ready!");
$this->info("⚡️ Installed!");
}
}