From c330c9d2c6b5b4ea3b5c63aa337a3784a8c36fcc Mon Sep 17 00:00:00 2001 From: Jason Varga Date: Fri, 9 Oct 2026 16:41:46 -0400 Subject: [PATCH 1/2] Replace pro:enable output with a check line MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Run `pro:enable` quietly and print a single `✔ Pro enabled` line in its place, matching the task completion lines. Co-Authored-By: Claude Opus 5.5 --- src/NewCommand.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/NewCommand.php b/src/NewCommand.php index 38134a4..648061c 100644 --- a/src/NewCommand.php +++ b/src/NewCommand.php @@ -1041,12 +1041,14 @@ protected function enableStatamicPro() $statusCode = (new Please($this->output)) ->cwd($this->absolutePath) - ->run('pro:enable', '--no-interaction'); + ->run('pro:enable', '--no-interaction', '--quiet'); if ($statusCode !== 0) { throw new RuntimeException('There was a problem enabling Statamic Pro!'); } + $this->output->writeln(' ✔ Pro enabled'); + if ($this->statamicLicenseKey) { $this->writeStatamicLicenseKeyToEnv(); } From b594308afc653013c55cf378d8247a8a9dc04390 Mon Sep 17 00:00:00 2001 From: Jason Varga Date: Fri, 9 Oct 2026 16:41:46 -0400 Subject: [PATCH 2/2] Relabel tasks once they complete MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add an optional completed label to `runCommands()` so a finished task reads `✔ Statamic installed` instead of `✔ Installing Statamic`. The Git step gets the same treatment. Co-Authored-By: Claude Opus 5.5 --- src/Concerns/RunsCommands.php | 14 ++++++++------ src/NewCommand.php | 4 ++-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/Concerns/RunsCommands.php b/src/Concerns/RunsCommands.php index b1a2092..8115946 100644 --- a/src/Concerns/RunsCommands.php +++ b/src/Concerns/RunsCommands.php @@ -15,9 +15,9 @@ trait RunsCommands * * @return Process */ - protected function runCommand(string $command, ?string $workingPath = null, bool $disableOutput = false, ?string $taskLabel = null) + protected function runCommand(string $command, ?string $workingPath = null, bool $disableOutput = false, ?string $taskLabel = null, ?string $completedTaskLabel = null) { - return $this->runCommands([$command], $workingPath, $disableOutput, $taskLabel); + return $this->runCommands([$command], $workingPath, $disableOutput, $taskLabel, $completedTaskLabel); } /** @@ -25,7 +25,7 @@ protected function runCommand(string $command, ?string $workingPath = null, bool * * @return Process */ - protected function runCommands(array $commands, ?string $workingPath = null, bool $disableOutput = false, ?string $taskLabel = null) + protected function runCommands(array $commands, ?string $workingPath = null, bool $disableOutput = false, ?string $taskLabel = null, ?string $completedTaskLabel = null) { if (! $this->output->isDecorated()) { $commands = array_map(function ($value) { @@ -66,7 +66,7 @@ protected function runCommands(array $commands, ?string $workingPath = null, boo $process = Process::fromShellCommandline(implode(' && ', $commands), $workingPath, timeout: null); if ($taskLabel && ! $disableOutput && $this->shouldRunAsTask()) { - return $this->runProcessAsTask($process, $taskLabel); + return $this->runProcessAsTask($process, $taskLabel, $completedTaskLabel); } if ('\\' !== DIRECTORY_SEPARATOR && file_exists('/dev/tty') && is_readable('/dev/tty')) { @@ -105,14 +105,14 @@ private function shouldRunAsTask(): bool /** * Run the given process within a Laravel Prompts task, streaming its output into the task's log. */ - private function runProcessAsTask(Process $process, string $taskLabel): Process + private function runProcessAsTask(Process $process, string $taskLabel, ?string $completedTaskLabel = null): Process { $output = ''; task( label: $taskLabel, keepSummary: true, - callback: function (Logger $logger) use ($process, &$output) { + callback: function (Logger $logger) use ($process, $completedTaskLabel, &$output) { $process->run(function ($type, $line) use ($logger, &$output) { $output .= $line; $logger->line($line); @@ -120,6 +120,8 @@ private function runProcessAsTask(Process $process, string $taskLabel): Process if (! $process->isSuccessful()) { $logger->error("Failed with exit code {$process->getExitCode()}"); + } elseif ($completedTaskLabel) { + $logger->label($completedTaskLabel); } }, ); diff --git a/src/NewCommand.php b/src/NewCommand.php index 648061c..e2483a6 100644 --- a/src/NewCommand.php +++ b/src/NewCommand.php @@ -514,7 +514,7 @@ protected function installBaseProject() $commands[] = "chmod 755 \"$this->absolutePath/please\""; } - $this->runCommands($commands, taskLabel: 'Installing Statamic'); + $this->runCommands($commands, taskLabel: 'Installing Statamic', completedTaskLabel: 'Statamic installed'); if (! $this->wasBaseInstallSuccessful()) { throw new RuntimeException('There was a problem installing Statamic!'); @@ -842,7 +842,7 @@ protected function initializeGitRepository() "git branch -M {$branch}", ]; - $this->runCommands($commands, workingPath: $this->absolutePath, taskLabel: 'Initializing Git repository'); + $this->runCommands($commands, workingPath: $this->absolutePath, taskLabel: 'Initializing Git repository', completedTaskLabel: 'Git repository initialized'); return $this; }