Skip to content

Collapse install output with task() - #110

Merged
jasonvarga merged 6 commits into
masterfrom
prompts-task
Oct 9, 2026
Merged

jasonvarga merged 6 commits into
masterfrom
prompts-task

Conversation

@duncanmcclean

@duncanmcclean duncanmcclean commented Jul 31, 2026 •

Copy link
Copy Markdown
Member

This pull request integrates the task() helper from laravel/prompts into the install process, similar to what the Laravel installer has started doing.

The composer create-project step and git init step currently dump their raw, scrolling command output straight to the terminal. This PR wraps them in a task() instead, which collapses the output into a spinner with a live-updating log, finishing as a single ✔ Installing Statamic / ✔ Initializing Git repository line on success.

This only kicks in when task() and pcntl_fork are available and output is decorated at normal verbosity — otherwise RunsCommands falls back to the existing raw scrolling output, so behaviour is unchanged for --no-ansi, -v, and non-interactive/non-decorated environments.

edalzell and others added 3 commits June 11, 2026 16:27
Wrap the composer create-project and git init steps in RunsCommands
with a Laravel Prompts task(), collapsing the raw scrolling output
into a spinner that finishes as a single checkmark line, matching
what the Laravel installer now does. Falls back to the existing raw
output when task()/pcntl_fork aren't available or output isn't
decorated.
@duncanmcclean
duncanmcclean requested a review from jasonvarga July 31, 2026 17:46
jasonvarga and others added 3 commits October 9, 2026 11:18
task() exists from laravel/prompts 0.3.15, but keepSummary was added in 0.3.17, so checking function_exists allowed a fatal error on 0.3.15/0.3.16.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Previously the entire stderr was passed to the logger as a single error, so only its first line was styled as the error and only the last 10 lines of output remained visible. Now a short error is logged and the full output is printed after the task.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Out of scope for this PR.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jasonvarga
jasonvarga merged commit 2adde70 into master Oct 9, 2026
3 checks passed
@jasonvarga
jasonvarga deleted the prompts-task branch October 9, 2026 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants