diff options
| author | Ash McKenzie <amckenzie@gitlab.com> | 2018-09-13 14:55:11 +1000 |
|---|---|---|
| committer | Ash McKenzie <amckenzie@gitlab.com> | 2018-09-13 14:55:11 +1000 |
| commit | 4656cd714f04f30d4542e57d46434829a09ff696 (patch) | |
| tree | 986fdee19f31ac228981e952dd22b74e2760e9ec /lib | |
| parent | 58acc2b668e86946c58db4dd41d50edceb7218f9 (diff) | |
| download | gitlab-shell-4656cd714f04f30d4542e57d46434829a09ff696.tar.gz | |
Print message to $stderr for custom action
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/action/custom.rb | 6 |
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! |
