diff options
Diffstat (limited to 'lib/keyringer/actions/decrypt.rb')
-rw-r--r-- | lib/keyringer/actions/decrypt.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/keyringer/actions/decrypt.rb b/lib/keyringer/actions/decrypt.rb index 33f01c2..bac4785 100644 --- a/lib/keyringer/actions/decrypt.rb +++ b/lib/keyringer/actions/decrypt.rb @@ -22,10 +22,9 @@ module Keyringer module Actions class Decrypt def execute - path = Keyring::UserConfig.instance.path - filename = path + '/keys/' + $args[0] + '.asc' - crypt = Keyring::Crypt.new - crypt.decrypt(filename) + raise "Missing key argument" if $args[0].nil? + crypt = Keyring::Crypt.new + crypt.decryptKey($args[0]) end end end |