mirror of
https://github.com/apache/sqoop.git
synced 2025-05-08 03:51:38 +08:00
SQOOP-1858: Sqoop2: Print out warnings from git apply on output of precommit hook
(Jarek Jarcec Cecho via Abraham Elmahrek)
This commit is contained in:
parent
e2e5aa8bf5
commit
c3900910f8
@ -192,9 +192,10 @@ def git_apply(result, cmd, patch_file, strip, output_dir):
|
||||
with open(output_file) as fh:
|
||||
output = fh.read()
|
||||
if rc == 0:
|
||||
result.success("Patch applied correctly")
|
||||
if output:
|
||||
print output
|
||||
result.success("Patch applied, but there has been warnings:\n{code}%s{code}\n" % (output))
|
||||
else:
|
||||
result.success("Patch applied correctly")
|
||||
else:
|
||||
result.fatal("failed to apply patch (exit code %d):\n{code}%s{code}\n" % (rc, output))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user