1
0
Fork 0
mirror of https://github.com/nishiki/manage-password.git synced 2025-02-20 01:50:04 +00:00

fix no show wallet in other folder

This commit is contained in:
Adrien Waksberg 2017-10-01 20:01:35 +02:00
parent ef0a908144
commit 2abad3695f
2 changed files with 6 additions and 1 deletions

View file

@ -373,7 +373,8 @@ module MPW
# List all wallets
def list_wallet
wallets = []
wallets = @config.wallet_paths.keys
Dir.glob("#{@config.wallet_dir}/*.mpw").each do |f|
wallet = File.basename(f, '.mpw')
wallet += ' *'.green if wallet == @config.default_wallet

View file

@ -171,6 +171,10 @@ class TestConfig < Test::Unit::TestCase
assert_match(%r{path_wallet_default.+\| #{Dir.pwd}/default.mpw}, output)
assert(File.exist?("#{Dir.pwd}/default.mpw"))
output = %x(mpw wallet)
puts output
assert_match('default', output)
output = %x(mpw wallet --default-path)
puts output
assert_match(I18n.t('form.set_wallet_path.valid'), output)