Skip to content

[29.x backport] fix: suppress printing the newline when a status error has no output - #7546

Merged
thaJeztah merged 1 commit into
docker:29.xfrom
vvoland:7543-29.x
Nov 24, 2026
Merged

thaJeztah merged 1 commit into
docker:29.xfrom
vvoland:7543-29.x

Conversation

@vvoland

@vvoland vvoland commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

When a cli.StatusError was returned by a plugin, the error would be printed with Fprintln even if the message was empty. This avoids the call entirely if cli.StatusError is returned and the error text is empty to allow plugins to return non-zero exit statuses without printing anything.

Related to docker/compose#14382.

When a `cli.StatusError` was returned by a plugin, the error would be
printed with `Fprintln` even if the message was empty. This avoids the
call entirely if `cli.StatusError` is returned and the error text is
empty to allow plugins to return non-zero exit statuses without printing
anything.

Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
(cherry picked from commit b0a3c17)
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
@vvoland vvoland added this to the 29.10.1 milestone Nov 24, 2026
@vvoland vvoland self-assigned this Nov 24, 2026

@thaJeztah thaJeztah left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cli-plugins/plugin/plugin.go 0.00% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@docker-agent docker-agent left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assessment: 🟢 APPROVE

@thaJeztah
thaJeztah merged commit c48360f into docker:29.x Nov 24, 2026
109 of 110 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants