* Prune the uv cache for CI: removes pre-built wheels and unzipped source * distributions while retaining source-built wheels.
()
| 225 | * distributions while retaining source-built wheels. |
| 226 | */ |
| 227 | async cachePrune(): Promise<void> { |
| 228 | const args = ['cache', 'prune', '--ci']; |
| 229 | const pretty = `uv ${args.join(' ')}`; |
| 230 | debug(`Running "${pretty}"...`); |
| 231 | try { |
| 232 | await execa(this.uvPath, args, { |
| 233 | env: getProtectedUvEnv(process.env, this.uvCacheDir), |
| 234 | }); |
| 235 | } catch (err) { |
| 236 | // Cache pruning is best-effort; log but don't fail the build. |
| 237 | debug( |
| 238 | `Warning: ${pretty} failed: ${err instanceof Error ? err.message : String(err)}` |
| 239 | ); |
| 240 | } |
| 241 | } |
| 242 | |
| 243 | private async runUvCmd( |
| 244 | args: string[], |
no test coverage detected