From 29b0e04a3cbcab98ad5a78d5c323275164361ac1 Mon Sep 17 00:00:00 2001 From: Kendal Cormany Date: Mon, 28 Oct 2024 19:02:50 -0700 Subject: [PATCH] This should fix the issue --- src/pythonEnvironment.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/pythonEnvironment.ts b/src/pythonEnvironment.ts index a9f67872..6a8f32d9 100644 --- a/src/pythonEnvironment.ts +++ b/src/pythonEnvironment.ts @@ -106,7 +106,19 @@ export class PythonEnvironment { path.join(this.appResourcesPath, 'output', fileName), path.join(this.pythonRootPath, fileName) ); + await fsPromises.chmod( path.join(this.pythonRootPath, fileName) ,'755'); }); + try { + // This is a cleanup step, and is non critical if failed. + //await fsPromises.rm(path.join(this.appResourcesPath, 'output'), { recursive: true, force: true }); + } catch (error) { + null; + } + const sleep = (ms: number) => new Promise(resolve => setTimeout(resolve, ms)) + await sleep(2000); + } + else + { try { // This is a cleanup step, and is non critical if failed. await fsPromises.rm(path.join(this.appResourcesPath, 'output'), { recursive: true, force: true });