summaryrefslogtreecommitdiff
path: root/lib/gitlab_shell.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gitlab_shell.rb')
-rw-r--r--lib/gitlab_shell.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/gitlab_shell.rb b/lib/gitlab_shell.rb
index 01ef4a1..08022c5 100644
--- a/lib/gitlab_shell.rb
+++ b/lib/gitlab_shell.rb
@@ -10,7 +10,6 @@ class GitlabShell
@origin_cmd = ENV['SSH_ORIGINAL_COMMAND']
@config = GitlabConfig.new
@repos_path = @config.repos_path
- @user_tried = false
end
def exec
@@ -70,10 +69,9 @@ class GitlabShell
def user
# Can't use "@user ||=" because that will keep hitting the API when @user is really nil!
- if @user_tried
+ if instance_variable_defined?('@user')
@user
else
- @user_tried = true
@user = api.discover(@key_id)
end
end