Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/backend/shell_env.rb4
-rw-r--r--lib/gitlab/satellite/action.rb6
2 files changed, 7 insertions, 3 deletions
diff --git a/lib/gitlab/backend/shell_env.rb b/lib/gitlab/backend/shell_env.rb
index 044afb27f3f..17ec029eed4 100644
--- a/lib/gitlab/backend/shell_env.rb
+++ b/lib/gitlab/backend/shell_env.rb
@@ -6,7 +6,9 @@ module Gitlab
def set_env(user)
# Set GL_ID env variable
- ENV['GL_ID'] = "user-#{user.id}"
+ if user
+ ENV['GL_ID'] = "user-#{user.id}"
+ end
end
def reset_env
diff --git a/lib/gitlab/satellite/action.rb b/lib/gitlab/satellite/action.rb
index 4890ccf21e6..489070f1a3f 100644
--- a/lib/gitlab/satellite/action.rb
+++ b/lib/gitlab/satellite/action.rb
@@ -39,8 +39,10 @@ module Gitlab
def prepare_satellite!(repo)
project.satellite.clear_and_update!
- repo.config['user.name'] = user.name
- repo.config['user.email'] = user.email
+ if user
+ repo.config['user.name'] = user.name
+ repo.config['user.email'] = user.email
+ end
end
def default_options(options = {})