diff options
author | Drew Blessing <drew.blessing@me.com> | 2014-11-12 14:58:33 -0600 |
---|---|---|
committer | Drew Blessing <drew.blessing@me.com> | 2014-11-18 07:56:08 -0600 |
commit | 57c9080077524350b121dc3ade6548a4dde9a414 (patch) | |
tree | 9467c40a74449dd17d6fc0df72eefaf40144c626 /lib/gitlab_custom_hook.rb | |
parent | dbdcc5f400df466944ad5e55e8e03dee55de865f (diff) | |
download | gitlab-shell-57c9080077524350b121dc3ade6548a4dde9a414.tar.gz |
Fix custom hook output and return values
Diffstat (limited to 'lib/gitlab_custom_hook.rb')
-rw-r--r-- | lib/gitlab_custom_hook.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/gitlab_custom_hook.rb b/lib/gitlab_custom_hook.rb index ba11e29..5533aa8 100644 --- a/lib/gitlab_custom_hook.rb +++ b/lib/gitlab_custom_hook.rb @@ -22,7 +22,7 @@ class GitlabCustomHook def update(ref_name, old_value, new_value, repo_path) hook = hook_file('update', repo_path) return true if hook.nil? - system(hook, ref_name, old_value, new_value) ? true : false + system(hook, ref_name, old_value, new_value) end private @@ -51,11 +51,11 @@ class GitlabCustomHook # need to close stdin before reading stdout stdin.close - # only output stdut_stderr if scripts doesn't return 0 unless wait_thr.value == 0 exit_status = false - stdout_stderr.each_line { |line| puts line } end + + stdout_stderr.each_line { |line| puts line } end exit_status |