1
0
Fork 0
mirror of https://github.com/nishiki/manage-password.git synced 2024-11-23 13:57:52 +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,11 +164,15 @@ class Cli
if not force if not force
result = @m.searchById(id) result = @m.searchById(id)
displayFormat(result) if result.length > 0
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
else
puts "Nothing result!"
end end
end end