(pv: PythonVersion)
| 382 | } |
| 383 | |
| 384 | function isInstalled(pv: PythonVersion): boolean { |
| 385 | try { |
| 386 | const installed = getInstalledPythons(); |
| 387 | const version = pythonVersionString(pv); |
| 388 | if (!version) return false; |
| 389 | return installed.has(version); |
| 390 | } catch (err) { |
| 391 | throw new NowBuildError({ |
| 392 | code: 'UV_ERROR', |
| 393 | link: 'https://vercel.link/python-version', |
| 394 | message: err instanceof Error ? err.message : String(err), |
| 395 | }); |
| 396 | } |
| 397 | } |
no test coverage detected