1
0
Fork 0
mirror of https://github.com/nishiki/manage-password.git synced 2024-11-27 07:33:05 +00:00

no show an void item if the item doesn't exist

This commit is contained in:
nishiki 2013-09-08 18:02:10 +02:00
parent 548a1e8fcc
commit 59cffbf3eb

View file

@ -164,12 +164,16 @@ class Cli
if not force if not force
result = @m.searchById(id) result = @m.searchById(id)
if result.length > 0
displayFormat(result) displayFormat(result)
confirm = ask("Are you sure to remove the item: #{id} ? (y/N) ") confirm = ask("Are you sure to remove the item: #{id} ? (y/N) ")
if confirm =~ /^(y|yes|YES|Yes|Y)$/ if confirm =~ /^(y|yes|YES|Yes|Y)$/
force = true force = true
end end
else
puts "Nothing result!"
end
end end
if force if force