cli
cli copied to clipboard
fix(hooks): ensure command errors are displayed before CLI hooks
This PR fixes the ordering of CLI hook output and command errors.
Currently, when a command fails, the "What's next" hook message is printed before the actual error, which can confuse users.
Changes
-
Ensure command errors are displayed before CLI hooks.
-
Preserve the existing hook functionality.
-
Improve the readability of CLI output in failure scenarios.
-
Reviewed the execution flow of
runDocker() -
Verified that command errors are emitted before hook output
-
No changes to public APIs
Fixes #6973