Right now, if you list the contents of a package or set of packages with a filter, and that filter does not match any actions that exist within the package, pkg contents fails with a generic exit status:
$ pkg contents -t depend -a type=optional -H -o fmri SUNWcs
pkg: contents: no matching actions found in the listed packages
$ echo $?
1
It seems useful to be able to distinguish the "no matching actions found in the listed packages" case from other errors without parsing the human-readable error message.
It might even make sense to add a new flag (perhaps -q) to just squelch this error altogether and exit 0 in this case.
Right now, if you list the contents of a package or set of packages with a filter, and that filter does not match any actions that exist within the package,
pkg contents
fails with a generic exit status:It seems useful to be able to distinguish the "no matching actions found in the listed packages" case from other errors without parsing the human-readable error message.
It might even make sense to add a new flag (perhaps -q) to just squelch this error altogether and exit 0 in this case.