mirror of
https://github.com/nishiki/manage-password.git
synced 2025-02-21 10:20:05 +00:00
minor refacto
This commit is contained in:
parent
84afbc4b40
commit
55c07b90af
1 changed files with 4 additions and 8 deletions
|
@ -66,19 +66,15 @@ cli = MPW::Cli.new(config)
|
||||||
|
|
||||||
cli.load_config
|
cli.load_config
|
||||||
|
|
||||||
if !options[:list].nil?
|
if options.key?(:list)
|
||||||
cli.list_wallet
|
cli.list_wallet
|
||||||
else
|
else
|
||||||
cli.get_wallet(options[:wallet])
|
cli.get_wallet(options[:wallet])
|
||||||
cli.decrypt
|
cli.decrypt
|
||||||
|
|
||||||
if !options[:list_keys].nil?
|
if options.key?(:list_keys)
|
||||||
cli.list_keys
|
cli.list_keys
|
||||||
elsif !options[:gpg_key].nil?
|
elsif options.key?(:gpg_key)
|
||||||
if options[:delete]
|
options[:delete] ? cli.delete_key(options[:gpg_key]) : cli.add_key(options[:gpg_key])
|
||||||
cli.delete_key(options[:gpg_key])
|
|
||||||
else
|
|
||||||
cli.add_key(options[:gpg_key])
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue