Commit 38b8600f authored by Pablo Carranza's avatar Pablo Carranza

Invert clause when checking key for clarity

parent 089df337
...@@ -18,8 +18,8 @@ require_relative "../lib/gitlab_net" ...@@ -18,8 +18,8 @@ require_relative "../lib/gitlab_net"
require_relative "../lib/gitlab_keys" require_relative "../lib/gitlab_keys"
authorized_key = GitlabNet.new.authorized_key(key) authorized_key = GitlabNet.new.authorized_key(key)
unless authorized_key.nil? if authorized_key.nil?
puts GitlabKey.new.key_line("key-#{authorized_key['id']}", authorized_key["key"])
else
puts "# No key was found for #{key}" puts "# No key was found for #{key}"
else
puts GitlabKey.new.key_line("key-#{authorized_key['id']}", authorized_key["key"])
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment