[pacman-dev] [PATCH] pacman/pacman-conf: -i/--is-set switch, returns 0 if option set

Eli Schwartz eschwartz at archlinux.org
Wed Sep 11 00:29:00 UTC 2019

On 9/10/19 2:32 PM, Matthew Sexton wrote:
> Returns 1 if option not set. Returns 1 with error to stderr if
> flag does not exist. Case insensitive.

As discussed on IRC, it seems like this may be easier and more reliable
to achieve by using exit statuses. Instead of exiting 1 on a missing
flag, and returning 0 otherwise while printing out the key (or not)...

Maybe emulate e.g. grep. Return 2 if an error occurred, i.e. missing
option, and then even without -i, we can return 1 if the option is not set.

Eli Schwartz
Bug Wrangler and Trusted User

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 1601 bytes
Desc: OpenPGP digital signature
URL: <https://lists.archlinux.org/pipermail/pacman-dev/attachments/20190910/b570faf6/attachment-0001.sig>

More information about the pacman-dev mailing list