Skip to content

Error hooks are printed before command output #6973

Description

@thaJeztah

Description

Noticed this while testing #6972

The "what's next" hint is printed before the command output, which probably should be after (as we do for other hints);

docker run --rm --env-file=./no-such-file alpine

What's next:
    Debug this container error with Gordon → docker ai "help me fix this container error"
docker: open ./no-such-file: no such file or directory

Run 'docker run --help' for more information

Reproduce

Expected behavior

No response

docker version

Client:
 Version:           29.4.3
 API version:       1.54
 Go version:        go1.26.2
 Git commit:        055a478
 Built:             Wed May  6 17:06:34 2026
 OS/Arch:           darwin/arm64
 Context:           desktop-linux

docker info

not relevant

Additional Info

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions