Gitlab::ShellEnv added
This commit is contained in:
parent
b698094d4d
commit
49cf9badbc
4 changed files with 22 additions and 3 deletions
|
@ -17,6 +17,8 @@ module Gitlab
|
|||
# * Locks the satellite repo
|
||||
# * Yields the prepared satellite repo
|
||||
def in_locked_and_timed_satellite
|
||||
Gitlab::ShellEnv.set_env(user)
|
||||
|
||||
Grit::Git.with_timeout(options[:git_timeout]) do
|
||||
project.satellite.lock do
|
||||
return yield project.satellite.repo
|
||||
|
@ -28,6 +30,8 @@ module Gitlab
|
|||
rescue Grit::Git::GitTimeout => ex
|
||||
Gitlab::GitLogger.error(ex.message)
|
||||
return false
|
||||
ensure
|
||||
Gitlab::ShellEnv.reset_env
|
||||
end
|
||||
|
||||
# * Clears the satellite
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue