mirror of
https://github.com/nishiki/manage-password.git
synced 2024-11-23 22:03:05 +00:00
fix import default yaml
This commit is contained in:
parent
9bd5024fef
commit
3da68967f9
2 changed files with 2 additions and 3 deletions
|
@ -32,7 +32,7 @@ class Cli
|
||||||
raise(@sync.error_msg) if not @sync.sync
|
raise(@sync.error_msg) if not @sync.sync
|
||||||
|
|
||||||
return true
|
return true
|
||||||
rescue Exception => e
|
# rescue Exception => e
|
||||||
puts "#{I18n.t('display.error')} #7: #{e}".red
|
puts "#{I18n.t('display.error')} #7: #{e}".red
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
@ -298,10 +298,8 @@ class Cli
|
||||||
|
|
||||||
if not force
|
if not force
|
||||||
result = @mpw.import_preview(file, type)
|
result = @mpw.import_preview(file, type)
|
||||||
puts result
|
|
||||||
if result.is_a?(Array) and not result.empty?
|
if result.is_a?(Array) and not result.empty?
|
||||||
result.each do |r|
|
result.each do |r|
|
||||||
puts r.class
|
|
||||||
display_item(r)
|
display_item(r)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
1
mpw
1
mpw
|
@ -92,6 +92,7 @@ OptionParser.new do |opts|
|
||||||
|
|
||||||
opts.on('-i', '--import FILE', I18n.t('option.import')) do |file|
|
opts.on('-i', '--import FILE', I18n.t('option.import')) do |file|
|
||||||
options[:import] = file
|
options[:import] = file
|
||||||
|
options[:type] = :yaml
|
||||||
end
|
end
|
||||||
|
|
||||||
opts.on('-f', '--force', I18n.t('option.force')) do
|
opts.on('-f', '--force', I18n.t('option.force')) do
|
||||||
|
|
Loading…
Reference in a new issue