| Total Complexity | 2 |
| Total Lines | 14 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | import subprocess |
||
| 2 | |||
| 3 | |||
| 4 | def run_check(command: str) -> tuple[bool, str]: |
||
| 5 | try: |
||
| 6 | return ( |
||
| 7 | True, |
||
| 8 | subprocess.check_output( |
||
| 9 | command, stderr=subprocess.STDOUT, shell=True, text=True |
||
| 10 | ), |
||
| 11 | ) |
||
| 12 | except subprocess.CalledProcessError as e: |
||
| 13 | return (False, e.output) |
||
| 14 |