Merely by looking add --status-fd, one cannot distinguish whether "addkey"
actually started the key-generation workflow or not; GOT_IT is output in both
cases. Obviously, I should not be expected to read the error message from the TTY.
$ gpg2 --expert --command-fd 0 --status-fd 3 3>&1 2>/dev/null >/dev/null
--edit-key dkg
[..]
[GNUPG:] GET_LINE keyedit.prompt
addkey
[GNUPG:] GOT_IT
Need the secret key to do this.
Anyway the error can be something else. Probably no-one will expect this one:
$ gpg2 --expert --command-fd 0 --status-fd 3 3>&1 2>/dev/null >/dev/null
--edit-key infinity0
Secret key is available.
[..]
[GNUPG:] GET_LINE keyedit.prompt
addkey
[GNUPG:] GOT_IT
Secret parts of primary key are not available.