summaryrefslogtreecommitdiff
path: root/lib/gitlab_keys.rb
diff options
context:
space:
mode:
authorJacob Vosmaer <jacob@gitlab.com>2016-08-03 18:59:33 +0200
committerJacob Vosmaer <jacob@gitlab.com>2016-08-03 18:59:33 +0200
commit784221bdb261c5edf9449f10e69ed8ebb5c98c03 (patch)
tree5926eb9bff5426afcdeb350d500bdf3895cc145f /lib/gitlab_keys.rb
parentf9a55789864e30c1fed2951e26fd62768fc04bce (diff)
downloadgitlab-shell-authorized-keys-permission-check.tar.gz
Add permission check tests, improve checkauthorized-keys-permission-check
Diffstat (limited to 'lib/gitlab_keys.rb')
-rw-r--r--lib/gitlab_keys.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/gitlab_keys.rb b/lib/gitlab_keys.rb
index 446ae9d..c719e8d 100644
--- a/lib/gitlab_keys.rb
+++ b/lib/gitlab_keys.rb
@@ -94,9 +94,9 @@ class GitlabKeys
end
def check_permissions
- open_auth_file('r+') { return true }
- rescue
- puts "error: could not open #{auth_file}"
+ open_auth_file('r+') { true }
+ rescue => ex
+ puts "error: could not open #{auth_file}: #{ex}"
if File.exist?(auth_file)
system('ls', '-l', auth_file)
else