mirror of https://github.com/explosion/spaCy.git
Make run_command backwards compatible
This commit is contained in:
parent
6547472347
commit
884cac5fb5
|
@ -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(
|
||||||
|
|
Loading…
Reference in New Issue