diff options
Diffstat (limited to 'lib/gitlab/git/hook.rb')
-rw-r--r-- | lib/gitlab/git/hook.rb | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/gitlab/git/hook.rb b/lib/gitlab/git/hook.rb index 8ccb3e64636..e29a1f7afa1 100644 --- a/lib/gitlab/git/hook.rb +++ b/lib/gitlab/git/hook.rb @@ -83,12 +83,11 @@ module Gitlab def call_update_hook(gl_id, gl_username, oldrev, newrev, ref) Dir.chdir(repo_path) do - stdout, stderr, status = Open3.capture3( - { - 'GL_ID' => gl_id, - 'GL_USERNAME' => gl_username - }, - path, ref, oldrev, newrev) + env = { + 'GL_ID' => gl_id, + 'GL_USERNAME' => gl_username + } + stdout, stderr, status = Open3.capture3(env, path, ref, oldrev, newrev) [status.success?, (stderr.presence || stdout).gsub(/\R/, "<br>").html_safe] end end |