As we reevaluate how to best support and maintain Staging Ref in the future, we encourage development teams using this environment to highlight their use cases in the following issue: https://gitlab.com/gitlab-com/gl-infra/software-delivery/framework/software-delivery-framework-issue-tracker/-/issues/36.

Skip to content
Snippets Groups Projects
Commit ff33e05b authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Merge pull request #81 from corny/patch-1

avoid @user_tried
parents 3a16acf3 4853c677
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -12,7 +12,6 @@ class GitlabShell
@origin_cmd = ENV['SSH_ORIGINAL_COMMAND']
@config = GitlabConfig.new
@repos_path = @config.repos_path
@user_tried = false
end
def exec
Loading
Loading
@@ -75,10 +74,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
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment