Run a command and handle errors
(command, description)
| 10 | from pathlib import Path |
| 11 | |
| 12 | def run_command(command, description): |
| 13 | """Run a command and handle errors""" |
| 14 | print(f"🔄 {description}...") |
| 15 | try: |
| 16 | result = subprocess.run(command, shell=True, check=True, capture_output=True, text=True) |
| 17 | print(f"✅ {description} completed successfully") |
| 18 | return True |
| 19 | except subprocess.CalledProcessError as e: |
| 20 | print(f"❌ {description} failed:") |
| 21 | print(f"Error: {e.stderr}") |
| 22 | return False |
| 23 | |
| 24 | def check_python_version(): |
| 25 | """Check if Python version is compatible""" |
no outgoing calls
no test coverage detected