Skip to content

CLI tool printing to stderr instead of stdout on some flags #794

@RicardoJeronimo

Description

@RicardoJeronimo

I noticed that patchman -lh is outputting to stderr instead of stdout, which prevents parsing the output using standard pipes:

root@9b7593cfd557:/srv/patchman# patchman -lh | grep Tags
Printing information for all Hosts
wlt1158941.domain.tld:
IP address   : 172.19.0.1
Reverse DNS  : None
Domain       : domain.tld
OS Variant   : Debian 11.11 x86_64
Kernel       : 5.10.102.1-microsoft-standard-WSL2
Architecture : x86_64
Last report  : 2026-03-05 10:24:36.450265+00:00
Packages     : 721
Repos        : 5
Updates      : 0
Tags         : Tag1
Needs reboot : False
Updated at   : 2025-12-18 17:25:55+00:00
Host repos   : True
root@9b7593cfd557:/srv/patchman#
root@9b7593cfd557:/srv/patchman#
root@9b7593cfd557:/srv/patchman# patchman -lh |& grep Tags
Tags         : Tag1

It's the same behavior on patchman -lr, but patchman -h is working as expected; so far I haven't tested other flags.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions