Checks if the target file is older than any source file.
(target: Path, sources: List[Path])
| 80 | cwd_str = f" (in {cwd})" if cwd else "" |
| 81 | print(f"{Colors.YELLOW}▶️ Running: {' '.join(cmd)}{cwd_str}{Colors.RESET}") |
| 82 | try: |
| 83 | proc = subprocess.run( |
| 84 | cmd, |
| 85 | cwd=cwd, |
| 86 | check=check, |
| 87 | stdout=sys.stdout, # Stream output directly |
| 88 | stderr=sys.stderr |
| 89 | ) |
| 90 | return proc |
| 91 | except FileNotFoundError as e: |
| 92 | print(f"{Colors.RED}❌ Error: Command '{cmd[0]}' not found. Is it in your PATH?{Colors.RESET}") |
| 93 | print(f" Details: {e}") |
| 94 | sys.exit(1) |
| 95 | except subprocess.CalledProcessError as e: |
| 96 | print(f"{Colors.RED}❌ Command failed with exit code {e.returncode}.{Colors.RESET}") |
| 97 | sys.exit(e.returncode) |
no outgoing calls
no test coverage detected