Skip to content

cli: print command errors before next-step hooks - #7175

Open
locker95 wants to merge 1 commit into
docker:masterfrom
locker95:fix/error-hooks-after-error
Open

cli: print command errors before next-step hooks#7175
locker95 wants to merge 1 commit into
docker:masterfrom
locker95:fix/error-hooks-after-error

Conversation

@locker95

Copy link
Copy Markdown

Error hooks were printing "What's next" before the actual failure showed up on stderr (main prints the error after hooks return).

Print the command error first when hooks are enabled, then run the hooks, and return a status-code-only error so main doesn't print it a second time. Same treatment for the plugin path.

Fixes #6973

Error-hooks were writing "What's next" to stderr before main printed
the failure, so the hint appeared above the actual error. Print the
error first, then run hooks, and return a status-code-only error so
main does not print it twice.

Fixes docker#6973

Signed-off-by: Dean Chen <862469039@qq.com>
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.

Error hooks are printed before command output

1 participant