diff --git a/lib/pod/command/keys/rm.rb b/lib/pod/command/keys/rm.rb index 4e8f789..041e47f 100644 --- a/lib/pod/command/keys/rm.rb +++ b/lib/pod/command/keys/rm.rb @@ -48,6 +48,11 @@ 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 @@ -55,7 +60,7 @@ def run 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