Run a command without redirecting stdin, stdout, or stderr Args: cmd: The command to run env: Extra environment variables to define in the subprocess. Defaults to None. Returns: subprocess returncode
(cmd: str, env: Mapping[str, str] | None = None)
| 131 | |
| 132 | |
| 133 | def run_interactive_shell(cmd: str, env: Mapping[str, str] | None = None) -> int: |
| 134 | """Run a command without redirecting stdin, stdout, or stderr |
| 135 | |
| 136 | Args: |
| 137 | cmd: The command to run |
| 138 | env: Extra environment variables to define in the subprocess. Defaults to None. |
| 139 | |
| 140 | Returns: |
| 141 | subprocess returncode |
| 142 | """ |
| 143 | if env is not None: |
| 144 | env = {**os.environ, **env} |
| 145 | return subprocess.run(cmd, shell=True, env=env).returncode |
nothing calls this directly
no outgoing calls
no test coverage detected