diff --git a/src/Console/ProxyCommand.php b/src/Console/ProxyCommand.php index b7b156b..e61caeb 100644 --- a/src/Console/ProxyCommand.php +++ b/src/Console/ProxyCommand.php @@ -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!"); } }