apt-add-repository exits 0 even if it can't retrieve key
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
software-properties (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Example command:
$ sudo apt-add-repository -y ppa:ansible/ansible
gpg: keyring `/tmp/tmp_
gpg: keyring `/tmp/tmp_
gpg: requesting key 7BB9C367 from hkp server keyserver.
gpgkeys: key 6125E2A8C77F281
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0
gpg: keyserver communications error: keyserver helper general error
gpg: keyserver communications error: unknown pubkey algorithm
gpg: keyserver receive failed: unknown pubkey algorithm
$ echo $?
0
The command should exit nonzero if any step was unable to be completed. Ideally, Ubuntu's keyserver won't fail, but that can't be helped.