diff options
| author | yum <yum.food.vr@gmail.com> | 2025-07-24 16:40:16 -0700 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2025-07-24 16:40:16 -0700 |
| commit | 8368883ca3c280d0e6b3b2b69c12ab76edead1fc (patch) | |
| tree | f617987b6bc77f8564d454e4adc32a21f9863c01 /ui/build_scripts | |
| parent | 672d0a5a170f15e13aa8f23047a0fe8b89a12633 (diff) | |
Enforce clean venv on buildv1.0.0-beta02v1.0.0-beta01
Diffstat (limited to 'ui/build_scripts')
| -rw-r--r-- | ui/build_scripts/setup-empty-venv.js | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/ui/build_scripts/setup-empty-venv.js b/ui/build_scripts/setup-empty-venv.js index 0691a51..5322ad9 100644 --- a/ui/build_scripts/setup-empty-venv.js +++ b/ui/build_scripts/setup-empty-venv.js @@ -8,12 +8,21 @@ const dllPath = path.join(projectRoot, 'dll_empty'); console.log('Creating empty virtual environment and dll directory...'); -// Create empty dll directory -if (!fs.existsSync(dllPath)) { - fs.mkdirSync(dllPath, { recursive: true }); - console.log('Created empty dll directory'); +// Delete dll & venv if they already exist +if (fs.existsSync(dllPath)) { + fs.rmSync(dllPath, { recursive: true, force: true }); + console.log('Deleted existing dll directory'); } +if (fs.existsSync(venvPath)) { + fs.rmSync(venvPath, { recursive: true, force: true }); + console.log('Deleted existing venv directory'); +} + +// Create empty dll folder +fs.mkdirSync(dllPath, { recursive: true }); +console.log('Created empty dll directory'); +// Create hermitic python venv try { console.log('Creating new venv...'); execSync(`python -m venv "${venvPath}"`, { stdio: 'inherit' }); |
