isotoma/yay — pull request #11 by Jc2k (2012-08-10 15:48:30+00:00)
Title: GPG error handling improvements

This stops GPG spamming the console as it tries to decrypt secrets. It turns out that despite redirecting stdout and stderr, unless GPG is in batch mode it will still manage to spam the console.

Unfortunately --batch stops in prompting for a password. This was never really supported behaviour - but does mean that people will have to actually set up GPG now.

While in there I now actually check the exit code and throw a NotFound error if decryption failed. Some sort of analogue to a HTTP 500 would be preferable to NotFound but things already properly handle NotFound so that will do for now.