common: Move call to ./_subprocess
parent
1de9c82d4a
commit
ae8f8af954
@ -0,0 +1,21 @@
|
||||
import subprocess
|
||||
from typing import (
|
||||
IO,
|
||||
Optional,
|
||||
Sequence,
|
||||
)
|
||||
|
||||
|
||||
def call(
|
||||
args: Sequence[str],
|
||||
check: bool = True,
|
||||
stdin: Optional[IO] = None,
|
||||
) -> subprocess.CompletedProcess:
|
||||
proc = subprocess.run(
|
||||
args,
|
||||
capture_output=True,
|
||||
check=check,
|
||||
text=True,
|
||||
stdin=stdin,
|
||||
)
|
||||
return proc
|
Loading…
Reference in New Issue