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( ret = subprocess.run(
command, command,
env=os.environ.copy(), env=os.environ.copy(),
capture_output=capture,
input=stdin, input=stdin,
text=True, text=True,
check=True, check=True,
stdout=subprocess.PIPE if capture else None,
stderr=subprocess.PIPE if capture else None,
) )
except FileNotFoundError: except FileNotFoundError:
raise FileNotFoundError( raise FileNotFoundError(