diff options
Diffstat (limited to 'hooks/pre-receive')
-rwxr-xr-x | hooks/pre-receive | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/hooks/pre-receive b/hooks/pre-receive index a4b2e32..66cb97d 100755 --- a/hooks/pre-receive +++ b/hooks/pre-receive @@ -4,8 +4,8 @@ # will be processed properly. refs = $stdin.read -key_id = ENV['GL_ID'] -protocol = ENV['GL_PROTOCOL'] +key_id = ENV.delete('GL_ID') +protocol = ENV.delete('GL_PROTOCOL') repo_path = Dir.pwd require_relative '../lib/gitlab_custom_hook' @@ -15,8 +15,5 @@ if GitlabAccess.new(repo_path, key_id, refs, protocol).exec && GitlabCustomHook.new.pre_receive(refs, repo_path) exit 0 else - # reset GL_ID env since we stop git push here - ENV['GL_ID'] = nil - exit 1 end |