(command)
| 133 | |
| 134 | |
| 135 | def _stream_shell_command(command): |
| 136 | process = subprocess.Popen( |
| 137 | command, |
| 138 | shell=True, |
| 139 | stdout=subprocess.PIPE, |
| 140 | stderr=subprocess.STDOUT, |
| 141 | universal_newlines=True, |
| 142 | ) |
| 143 | |
| 144 | # Stream the output to the console |
| 145 | for line in process.stdout: # type: ignore |
| 146 | print(line, end="") |
| 147 | yield line |
| 148 | |
| 149 | # Wait for the process to finish |
| 150 | process.wait() |
| 151 | |
| 152 | if process.returncode != 0: |
| 153 | raise Exception(f"Failed to run {command}") |
no outgoing calls
no test coverage detected