-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
podman images: not newline-terminated #2388
Comments
The code specifically does this now. It checks if output is a tty and if it is executes a printf("\n") otherwise it does not. And since you are piping to cat, it does not do it. |
ensure a final newline is always added to images output. fixes containers#2388 Signed-off-by: baude <bbaude@redhat.com>
|
@edsantiago Do you think we should not check for Humans on Stdout Templates and always print the newline? |
Did we add this in response to another bug? I can't think of another reason it would be there |
@rhatdan I strongly think output should be consistently newline-terminated irrespective of whether stdout is a tty. See my first comment about piping through a FWIW I seem to have found in my records a note about reporting this in |
Ps has this line I have no problem adding it. |
I did a quick search, and I can't find any issues that relate to this, so I have no idea why we added it in the first place. Given that, I'm fine with removing the TTY check. @baude @rhatdan We really need to start forcing bugfix commits to add comments with links to the issue number so we don't start reverting bugfixes accidentally |
Further info: it's a POSIX thing:
|
podman images
, with a non-json output format, omits the final newline:This would seem like a minor nit, except it might greatly surprise anyone who does:
If we have one image, nothing is output.
Even more confusingly, if there's more than one,(never mind: that was an artifact of some debugging I was trying)$id
(the last element of the line) includes a spurious newline:(Note to reviewer: I thought I had filed an issue about this months ago but can't find it now).
podman-1.0.0-1.git82e8011.fc29.x86_64
The text was updated successfully, but these errors were encountered: