Make run_command backwards compatible

This commit is contained in:
Matthew Honnibal 2020-08-26 04:33:42 +02:00
parent 6547472347
commit 884cac5fb5
1 changed files with 2 additions and 1 deletions

View File

@ -585,10 +585,11 @@ def run_command(command: Union[str, List[str]], *, capture=False, stdin=None) ->
ret = subprocess.run(
command,
env=os.environ.copy(),
capture_output=capture,
input=stdin,
text=True,
check=True,
stdout=subprocess.PIPE if capture else None,
stderr=subprocess.PIPE if capture else None,
)
except FileNotFoundError:
raise FileNotFoundError(