When missing key argument gpg returns error code 0, as if key was received successfully, but it not received for real.
I belive when argument is missing, gpg should return some non-zero error code.
Please, update gpg to return error code when argument is missing.
Now:
gpg --recv-key; echo $?
0
Should be:
gpg --recv-key; echo $?
1