try this:
GNUPGHOME=$(mktemp -d) gpgconf --list-options gpg-agent echo no-such-option > "$GNUPGHOME/gpg-agent.conf" gpgconf --list-options gpg-agent
the second gpgconf invocation returns a non-zero error code, prints nothing to stdout, and the following two lines to stderr:
gpgconf: running /usr/bin/gpg-agent failed (exitcode=2): General error gpgconf: fatal error (exit status 1)
This makes it pretty problematic to use gpgconf --list-options in initialization scripts (whether at a system level or at a user level) if there's a risk of a bad option being present.