1
0
mirror of https://github.com/oskar456/dzonegit.git synced 2024-05-11 05:55:41 +00:00

Fix whitespace check

This commit is contained in:
Ondřej Caletka
2018-07-07 22:07:03 +02:00
parent 3614beba9e
commit b04985c12a

View File

@ -52,10 +52,12 @@ def get_head():
def check_whitespace_errors(against):
r = subprocess.run(
["git", "diff-index", "--check", "--cached", against],
stderr=subprocess.PIPE
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
encoding="utf-8",
)
if r.returncode != 0:
raise HookException("Whitespace errors", r.stderr)
raise HookException("Whitespace errors", stderr=r.stdout)
def get_file_contents(path, revision=""):