mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Setup env explicitly on Windows
This commit is contained in:
parent
faa6f8c70c
commit
b3cd575278
1 changed files with 2 additions and 0 deletions
|
|
@ -81,6 +81,8 @@ class CalledProcessError(RuntimeError):
|
|||
def _setdefault_kwargs(kwargs: dict[str, Any]) -> None:
|
||||
for arg in ('stdin', 'stdout', 'stderr'):
|
||||
kwargs.setdefault(arg, subprocess.PIPE)
|
||||
if sys.platform == 'win32':
|
||||
kwargs.setdefault('env', os.environ)
|
||||
|
||||
|
||||
def _oserror_to_output(e: OSError) -> tuple[int, bytes, None]:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue