(userData: string)
| 77 | // ─── Setup state ────────────────────────────────────────────────────────────── |
| 78 | |
| 79 | export function checkSetupNeeded(userData: string): boolean { |
| 80 | const jsonPath = join(userData, 'python_setup.json') |
| 81 | if (!existsSync(jsonPath)) return true |
| 82 | try { |
| 83 | const data = JSON.parse(readFileSync(jsonPath, 'utf-8')) as SetupJson |
| 84 | if (data.version < SETUP_VERSION) return true |
| 85 | if (data.requirementsHash !== hashRequirements()) return true |
| 86 | } catch { |
| 87 | return true |
| 88 | } |
| 89 | if (!existsSync(getVenvPythonExe(userData))) return true |
| 90 | return false |
| 91 | } |
| 92 | |
| 93 | /** |
| 94 | * Write a sitecustomize.py into the venv that silently skips malformed certs |
no test coverage detected