Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-shell
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
iv
gitlab-shell
Commits
57c90800
Commit
57c90800
authored
Nov 12, 2014
by
Drew Blessing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix custom hook output and return values
parent
dbdcc5f4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
lib/gitlab_custom_hook.rb
lib/gitlab_custom_hook.rb
+3
-3
No files found.
lib/gitlab_custom_hook.rb
View file @
57c90800
...
@@ -22,7 +22,7 @@ class GitlabCustomHook
...
@@ -22,7 +22,7 @@ class GitlabCustomHook
def
update
(
ref_name
,
old_value
,
new_value
,
repo_path
)
def
update
(
ref_name
,
old_value
,
new_value
,
repo_path
)
hook
=
hook_file
(
'update'
,
repo_path
)
hook
=
hook_file
(
'update'
,
repo_path
)
return
true
if
hook
.
nil?
return
true
if
hook
.
nil?
system
(
hook
,
ref_name
,
old_value
,
new_value
)
?
true
:
false
system
(
hook
,
ref_name
,
old_value
,
new_value
)
end
end
private
private
...
@@ -51,11 +51,11 @@ class GitlabCustomHook
...
@@ -51,11 +51,11 @@ class GitlabCustomHook
# need to close stdin before reading stdout
# need to close stdin before reading stdout
stdin
.
close
stdin
.
close
# only output stdut_stderr if scripts doesn't return 0
unless
wait_thr
.
value
==
0
unless
wait_thr
.
value
==
0
exit_status
=
false
exit_status
=
false
stdout_stderr
.
each_line
{
|
line
|
puts
line
}
end
end
stdout_stderr
.
each_line
{
|
line
|
puts
line
}
end
end
exit_status
exit_status
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment