Repository navigation
feat(cli): stream build command output with verbose() - #19
Merged
Merged
Conversation
Command output was captured and shown only on failure, so a slow asset build looked hung. Build::verbose(), runVerbose(), --verbose and "verbose": true print it line by line as it runs. A failure after streaming repeats only the last 20 lines. StreamingCommandRunner extends CommandRunner, so existing runners keep working. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The packager can print a command's output while it runs.
Also
wptoolkit-build package --verboseand"verbose": trueinwptoolkit.json.Why
Output was captured and shown only when a command failed, so a slow asset build looked hung and CI logs said nothing about what ran.
Behaviour
| line). stderr is included.StreamingCommandRunnerinterface extendsCommandRunner, so existing runner implementations keep working; with one of those, verbose output is printed when the command ends.run(), becauserun()is variadic andcomposer()/scope()run long commands too.Tests
Written first, six of eight seen failing. They run real child processes: default quiet, verbose (stdout and stderr, ordering),
runVerbosefor one command, line-by-line callback, failure tail when streamed, full output when quiet, non-streaming runner fallback, config file. Liveness checked by hand: a line arrives two seconds before the next one the command prints.🤖 Generated with Claude Code