From 31b172b65a364aab439d611a5dc8a2f811adae7c Mon Sep 17 00:00:00 2001 From: Louis Date: Wed, 10 Jul 2024 16:13:46 +0700 Subject: [PATCH] fix: clean resources should not remove engine file --- .../infrastructure/commanders/usecases/init.cli.usecases.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cortex-js/src/infrastructure/commanders/usecases/init.cli.usecases.ts b/cortex-js/src/infrastructure/commanders/usecases/init.cli.usecases.ts index 9b8ab90ee..45c808f5e 100644 --- a/cortex-js/src/infrastructure/commanders/usecases/init.cli.usecases.ts +++ b/cortex-js/src/infrastructure/commanders/usecases/init.cli.usecases.ts @@ -297,9 +297,8 @@ export class InitCliUsecases { // Copy the additional files to the cortex-cpp directory for (const file of readdirSync(join(engineDir, engine))) { - if (file !== 'engine.dll') { + if (!file.includes('engine')) { await cpSync(join(engineDir, engine, file), join(engineDir, file)); - await rmSync(join(engineDir, engine, file)); } } decompressIndicator.succeed('Engine decompressed');