mirror of
https://gitlab.com/kupfer/kupferbootstrap.git
synced 2025-02-22 21:25:43 -05:00
exec/cmd: expose [subprocess.]CompletedProcess for easy import in other modules
This commit is contained in:
parent
9e81fbf345
commit
0693792791
1 changed files with 2 additions and 1 deletions
|
@ -3,6 +3,7 @@ import os
|
|||
import pwd
|
||||
import subprocess
|
||||
|
||||
from subprocess import CompletedProcess # make it easy for users of this module
|
||||
from shlex import quote as shell_quote
|
||||
from typing import Optional, Union, TypeAlias
|
||||
|
||||
|
@ -90,7 +91,7 @@ def run_cmd(
|
|||
elevation_method: Optional[ElevationMethod] = None,
|
||||
stdout: Optional[int] = None,
|
||||
stderr=None,
|
||||
) -> Union[subprocess.CompletedProcess, int]:
|
||||
) -> Union[CompletedProcess, int]:
|
||||
"execute `script` as `switch_user`, elevating and su'ing as necessary"
|
||||
kwargs: dict = {}
|
||||
env_cmd = []
|
||||
|
|
Loading…
Add table
Reference in a new issue