MCPcopy
hub / github.com/lightningpixel/modly / checkSetupNeeded

Function checkSetupNeeded

electron/main/python-setup.ts:79–91  ·  view source on GitHub ↗
(userData: string)

Source from the content-addressed store, hash-verified

77// ─── Setup state ──────────────────────────────────────────────────────────────
78
79export 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

Callers 1

setupIpcHandlersFunction · 0.90

Calls 2

hashRequirementsFunction · 0.85
getVenvPythonExeFunction · 0.85

Tested by

no test coverage detected