From 784221bdb261c5edf9449f10e69ed8ebb5c98c03 Mon Sep 17 00:00:00 2001 From: Jacob Vosmaer Date: Wed, 3 Aug 2016 18:59:33 +0200 Subject: Add permission check tests, improve check --- lib/gitlab_keys.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib') 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 -- cgit v1.2.1