mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2025-08-14 09:27:21 +08:00
Teach check-large-files-added about git-lfs. Reslves #82.
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user