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:
parent
548a1e8fcc
commit
59cffbf3eb
1 changed files with 8 additions and 4 deletions
|
@ -164,12 +164,16 @@ class Cli
|
|||
if not force
|
||||
result = @m.searchById(id)
|
||||
|
||||
if result.length > 0
|
||||
displayFormat(result)
|
||||
|
||||
confirm = ask("Are you sure to remove the item: #{id} ? (y/N) ")
|
||||
if confirm =~ /^(y|yes|YES|Yes|Y)$/
|
||||
force = true
|
||||
end
|
||||
else
|
||||
puts "Nothing result!"
|
||||
end
|
||||
end
|
||||
|
||||
if force
|
||||
|
|
Loading…
Reference in a new issue