From 7d7323bf76516aab4c66b85d458dc41e95ace952 Mon Sep 17 00:00:00 2001 From: roble Date: Thu, 25 Jun 2026 13:58:48 +0100 Subject: [PATCH 1/2] fix: update installation instructions for Docker and Native environments in InstallCommand --- src/Console/Commands/InstallCommand.php | 8 ++++++-- src/Console/Commands/StackCommand.php | 2 +- src/Environments/DockerEnvironment.php | 24 ------------------------ 3 files changed, 7 insertions(+), 27 deletions(-) diff --git a/src/Console/Commands/InstallCommand.php b/src/Console/Commands/InstallCommand.php index 4287ec3..9361688 100644 --- a/src/Console/Commands/InstallCommand.php +++ b/src/Console/Commands/InstallCommand.php @@ -495,8 +495,12 @@ protected function displaySuccess(): void $this->newLine(); $this->line('Next steps:'); $this->line(' 1. Ensure APP_URL is set correctly in .env'); - $this->line(' 2. Run: npm install && composer dev'); - $this->line(' 3. Open your app in the browser'); + if($this->option('driver') === 'docker') { + $this->line(' 2. Start the dev server: npm run dev'); + } else { + $this->line(' 2. Start the dev server: php artisan serve or composer dev'); + } + $this->line(' 3. Open your app in the browser: '.config('app.url').''); $this->newLine(); $this->line('Learn more: https://github.com/saucebase-dev/saucebase'); } diff --git a/src/Console/Commands/StackCommand.php b/src/Console/Commands/StackCommand.php index 0c48f24..1a6ec13 100644 --- a/src/Console/Commands/StackCommand.php +++ b/src/Console/Commands/StackCommand.php @@ -132,7 +132,7 @@ private function runDevMode(string $framework): int $this->skipGeneratedFiles($framework); $this->runNpmInstall(); - $this->info("Framework set to {$framework} (dev mode). Run: composer dev"); + $this->info("Framework set to {$framework} (dev mode)"); return self::SUCCESS; } diff --git a/src/Environments/DockerEnvironment.php b/src/Environments/DockerEnvironment.php index 7c67042..f038799 100644 --- a/src/Environments/DockerEnvironment.php +++ b/src/Environments/DockerEnvironment.php @@ -57,7 +57,6 @@ public function run(InstallCommand $command): int $this->runInstallInContainer($command); $this->reloadDocker($command); - $this->runNpmOnHost($command); return InstallCommand::SUCCESS; } @@ -154,29 +153,6 @@ protected function reloadDocker(InstallCommand $command): void $process->run(); } - protected function runNpmOnHost(InstallCommand $command): void - { - $command->info('Installing frontend dependencies...'); - $install = new Process(['npm', 'install'], base_path()); - $install->setTimeout(300); - $install->run(fn ($_type, $buffer) => $command->line(trim($buffer))); - - if (! $install->isSuccessful()) { - $command->warn('npm install failed. Run manually: npm install'); - - return; - } - - $command->info('Building frontend assets...'); - $build = new Process(['npm', 'run', 'build'], base_path()); - $build->setTimeout(300); - $build->run(fn ($_type, $buffer) => $command->line(trim($buffer))); - - if (! $build->isSuccessful()) { - $command->warn('npm run build failed. Run manually: npm run build'); - } - } - /** @return string[] */ public function buildContainerArgs(InstallCommand $command): array { From a15187ee43d272dbc531b9d2b9ce7e496e22a1e7 Mon Sep 17 00:00:00 2001 From: roble <3231587+roble@users.noreply.github.com> Date: Thu, 25 Jun 2026 13:00:02 +0000 Subject: [PATCH 2/2] PHP Linting (Pint) --- src/Console/Commands/InstallCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Console/Commands/InstallCommand.php b/src/Console/Commands/InstallCommand.php index 9361688..12f61d2 100644 --- a/src/Console/Commands/InstallCommand.php +++ b/src/Console/Commands/InstallCommand.php @@ -495,7 +495,7 @@ protected function displaySuccess(): void $this->newLine(); $this->line('Next steps:'); $this->line(' 1. Ensure APP_URL is set correctly in .env'); - if($this->option('driver') === 'docker') { + if ($this->option('driver') === 'docker') { $this->line(' 2. Start the dev server: npm run dev'); } else { $this->line(' 2. Start the dev server: php artisan serve or composer dev');