grahamking / kip

Command line script to keep usernames/passwords in gnupg encrypted text files.
GNU General Public License v3.0
23 stars 6 forks source link

Don't create invalid files #19

Open nicolaslara opened 11 years ago

nicolaslara commented 11 years ago

When running ./kip add something the gpg command might fail (Invalid keys, or whatever). If it does, kip creates an empty file, tries to decrypt it (which obviously fail), and return a stack trace.

Ideally, if the GPG command fails (or returns an empty string), the file would never be created and an error message will be shown. Another option is that, if decryption fails, the file is considered corrupt and deleted.

grahamking commented 11 years ago

Ah, that sounds similar to #17

I agree we need friendlier wrapping of gnupg. It's confusing enough to most people, we shouldn't make things worse with stack traces.