Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion lib/pod/command/keys/rm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,19 @@ def run
raise Informative, 'Could not find a project to remove the key from.'
end

unless keyring.keys.count > 0
UI.puts "Project does not have keys to remove."
return
end

if @wipe_all
@key_name = '*'
end

matching_keys = matches(keyring.keys)
if matching_keys.count > 0
messages = matching_keys.map { |e| delete_key(e, keyring) }
raise Informative, messages.join("\n")
UI.puts messages.join("\n") unless config.silent?
else
raise Informative, "Could not find key that matched \"#{@key_name}\"."
end
Expand Down