Skip to content

ImagePush: print image reference to stdout on success#1470

Merged
jglogan merged 1 commit intoapple:mainfrom
mvanhorn:osc/1466-push-stdout
Apr 30, 2026
Merged

ImagePush: print image reference to stdout on success#1470
jglogan merged 1 commit intoapple:mainfrom
mvanhorn:osc/1466-push-stdout

Conversation

@mvanhorn
Copy link
Copy Markdown
Contributor

Resolves #1466.

container image push <ref> previously produced no standard output on success. Print the fully qualified reference (image.reference) after the push completes so callers can pipe the output into subsequent commands.

The issue raised the question: "echo back the supplied reference, or print the fully qualified reference?" — this PR prints image.reference, which is the normalized/fully-qualified form (e.g. docker.io/max-mustermann/scratch/test:latest from the issue's example), matching the same field that ImagePull and the progress bar already use.

This mirrors the existing pattern in ImageTag.run(), which prints the resolved target after the tag completes:

try await existing.tag(new: targetReference)
print(target)

Diff: 1 line.

Resolves apple#1466.

`container image push <ref>` previously produced no standard output on
success. Print the fully qualified reference (`image.reference`) after
the push completes so callers can pipe the output into subsequent
commands. This matches the existing pattern in `ImageTag.run()`, which
prints the resolved target after `existing.tag(new: targetReference)`.
@github-actions github-actions Bot added the cli label Apr 30, 2026
@jglogan jglogan merged commit bfe587b into apple:main Apr 30, 2026
4 checks passed
@jglogan
Copy link
Copy Markdown
Contributor

jglogan commented Apr 30, 2026

@mvanhorn Thanks for tackling that so quickly!

@mvanhorn
Copy link
Copy Markdown
Contributor Author

Thanks @jglogan! Glad it landed.

noah-thor pushed a commit to noah-thor/container that referenced this pull request May 6, 2026
-Resolves apple#1466.
- `container image push <ref>` previously produced no
  standard output on success. Print the fully qualified
  reference (`image.reference`) after the push completes
  so callers can pipe the output into subsequent
  commands.

Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: container image push should output imageref to stdout on success.

2 participants