summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAsh McKenzie <amckenzie@gitlab.com>2018-09-13 14:55:11 +1000
committerAsh McKenzie <amckenzie@gitlab.com>2018-09-13 14:55:11 +1000
commit4656cd714f04f30d4542e57d46434829a09ff696 (patch)
tree986fdee19f31ac228981e952dd22b74e2760e9ec /lib
parent58acc2b668e86946c58db4dd41d50edceb7218f9 (diff)
downloadgitlab-shell-4656cd714f04f30d4542e57d46434829a09ff696.tar.gz
Print message to $stderr for custom action
Diffstat (limited to 'lib')
-rw-r--r--lib/action/custom.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/action/custom.rb b/lib/action/custom.rb
index 2aea41a..328a12f 100644
--- a/lib/action/custom.rb
+++ b/lib/action/custom.rb
@@ -54,6 +54,8 @@ module Action
raise UnsuccessfulError, 'Response was not valid JSON'
end
+ inform_client(body['message']) if body['message']
+
print_flush(body['result'])
# In the context of the git push sequence of events, it's necessary to read
@@ -94,6 +96,10 @@ module Action
$stdout.flush
end
+ def inform_client(str)
+ $stderr.puts(str)
+ end
+
def validate!
validate_payload!
validate_data!