Skip to content

Commit 0c24a86

Browse files
committed
chore(@cubejs-backend/testing): Revert whole test dir removal as it contains node_modules
1 parent 2e1a6d4 commit 0c24a86

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

packages/cubejs-testing/src/birdbox.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,13 @@ export async function startBirdBoxFromCli(options: StartCliWithEnvOptions): Prom
161161

162162
const testDir = path.join(process.cwd(), 'birdbox-test-project');
163163

164-
if (fs.existsSync(path.join(testDir))) {
165-
fsExtra.removeSync(path.join(testDir));
164+
// Do not remove whole dir as it contains node_modules
165+
if (fs.existsSync(path.join(testDir, '.env'))) {
166+
fs.unlinkSync(path.join(testDir, '.env'));
167+
}
168+
169+
if (fs.existsSync(path.join(testDir, '.cubestore'))) {
170+
fsExtra.removeSync(path.join(testDir, '.env'));
166171
}
167172

168173
fsExtra.copySync(

0 commit comments

Comments
 (0)