mirror of
https://github.com/leon-ai/leon.git
synced 2025-01-08 10:47:45 +03:00
feat(scripts): auto delete .venv when Python packages failed to be installed on setup
This commit is contained in:
parent
e9f1aadc67
commit
eb72065e5e
@ -236,6 +236,11 @@ SPACY_MODELS.set('fr', {
|
|||||||
|
|
||||||
await installPytorch()
|
await installPytorch()
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
if (hasDotVenv) {
|
||||||
|
await fs.promises.rm(dotVenvPath, { recursive: true, force: true })
|
||||||
|
LogHelper.info(`Error occurred, so "${dotVenvPath}" was deleted`)
|
||||||
|
}
|
||||||
|
|
||||||
LogHelper.error(`Failed to install Python packages: ${e}`)
|
LogHelper.error(`Failed to install Python packages: ${e}`)
|
||||||
|
|
||||||
if (osType === OSTypes.Linux || osType === OSTypes.MacOS) {
|
if (osType === OSTypes.Linux || osType === OSTypes.MacOS) {
|
||||||
|
Loading…
Reference in New Issue
Block a user