Commit 57c90800 authored by Drew Blessing's avatar Drew Blessing

Fix custom hook output and return values

parent dbdcc5f4
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment