mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-04 19:26:52 +00:00
Teach check-large-files-added about git-lfs. Reslves #82.
This commit is contained in:
parent
2c62e4aafc
commit
3f6f23d73f
6 changed files with 109 additions and 2 deletions
|
|
@ -21,7 +21,9 @@ def cmd_output(*cmd, **kwargs):
|
|||
popen_kwargs.update(kwargs)
|
||||
proc = subprocess.Popen(cmd, **popen_kwargs)
|
||||
stdout, stderr = proc.communicate()
|
||||
stdout, stderr = stdout.decode('UTF-8'), stderr.decode('UTF-8')
|
||||
stdout = stdout.decode('UTF-8')
|
||||
if stderr is not None:
|
||||
stderr = stderr.decode('UTF-8')
|
||||
if retcode is not None and proc.returncode != retcode:
|
||||
raise CalledProcessError(cmd, retcode, proc.returncode, stdout, stderr)
|
||||
return stdout
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue