[Bug 264690] pkg info -e only returns (in exit code) status for last package listed

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 15 Jun 2022 13:38:55 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=264690

            Bug ID: 264690
           Summary: pkg info -e only returns (in exit code) status for
                    last package listed
           Product: Base System
           Version: 12.3-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: pen@lysator.liu.se

I little bit annoying, it seems "pkg info -e" only returns as the exit status
for the last package listed even though it checks all. A workaround is to just
use "pkg info" and redirect stdout to /dev/null...


# pkg info tmux zstd && echo OK
tmux-3.2a
zstd-1.5.2
OK

# pkg info tmux zstd not-found && echo OK
tmux-3.2a
zstd-1.5.2
pkg: No package(s) matching not-found

# pkg info tmux not-found zstd && echo OK
tmux-3.2a
pkg: No package(s) matching not-found
zstd-1.5.2

# pkg info -e tmux not-found zstd && echo OK
pkg: No package(s) matching not-found
OK

# pkg info -e tmux zstd not-found && echo OK
pkg: No package(s) matching not-found

-- 
You are receiving this mail because:
You are the assignee for the bug.