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
Still the same behavior in FreeBSD 13.2...
Created attachment 243828 [details] Patch to only return EXIT_SUCCESS if all pkgs listed are found Attached is a small patch that fixes "pkg info -e pkg1 .. pkgN" so that it returns EXIT_SUCCESS only if all packages are found, instead of just returning the state of the last package...
^Triage: trim Cc: list.