Skip to content

Fix "docker ps" with no containers regression#14919

Merged
calavera merged 1 commit intomoby:masterfrom
tianon:empty-ps-headers
Jul 23, 2015
Merged

Fix "docker ps" with no containers regression#14919
calavera merged 1 commit intomoby:masterfrom
tianon:empty-ps-headers

Conversation

@tianon
Copy link
Member

@tianon tianon commented Jul 23, 2015

The header row was not being printed when "docker ps" was invoked without containers thanks to the new format support, and we instead received a single blank line.

https://github.com/docker/docker/pull/14699/files#r35364230

The header row was not being printed when "docker ps" was invoked without containers thanks to the new format support, and we instead received a single blank line.

Signed-off-by: Andrew "Tianon" Page <[email protected]>
Copy link
Contributor

Choose a reason for hiding this comment

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

just curious, why does "table {{.Names}" result in one column but "table {{.ID}}" result in two?

edit: s/ID/Names/

Copy link
Member Author

Choose a reason for hiding this comment

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

ID results in two words, not two columns -- I went with single column outputs here so that we wouldn't have to deal with potentially inconsistent TabWriter output (since it'll make nice spacing so the table is visually "pretty").

Copy link
Contributor

Choose a reason for hiding this comment

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

ah ok thanks

@jessfraz
Copy link
Contributor

LGTM

@jessfraz jessfraz added this to the 1.8.0 milestone Jul 23, 2015
@estesp
Copy link
Contributor

estesp commented Jul 23, 2015

thanks for catching this and fixing and the test! LGTM

@calavera
Copy link
Contributor

LGTM, thank you!

calavera added a commit that referenced this pull request Jul 23, 2015
Fix "docker ps" with no containers regression
@calavera calavera merged commit cd9dd55 into moby:master Jul 23, 2015
@tianon tianon deleted the empty-ps-headers branch July 23, 2015 23:57
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.

6 participants