From bec681af2d59a5ba9ce041d9229ff504c63f18ef Mon Sep 17 00:00:00 2001 From: Oj Date: Sun, 23 May 2021 21:24:12 +0100 Subject: [PATCH] [Index] Fix caching issues with multiple BD themes in one repo --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index bb25b7f..0d5abee 100644 --- a/src/index.js +++ b/src/index.js @@ -145,7 +145,7 @@ for (const parentRepo of ModuleRepos) { const currentHash = await new Promise((res) => exec(`git rev-parse HEAD`, (err, stdout) => res(stdout.trim()))); - if (currentHash !== repo[1]) rmSync(cloneDir, { recursive: true, force: true }); + if (currentHash !== repo[1] && repo[1] !== '') rmSync(cloneDir, { recursive: true, force: true }); } process.chdir(distDir); // Incase current wd is broken, in which case exec / git crashes