From 24c2fcc504c0ae4eea851c3f047c45e9d41cea75 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Date: Thu, 18 Jan 2018 08:30:31 -0800 Subject: [PATCH] Fix deletion of node_modules in DT test del needs to have `{ force: true }` passed so that it can delete node_modules outside the working directory --- src/harness/externalCompileRunner.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/harness/externalCompileRunner.ts b/src/harness/externalCompileRunner.ts index c5e1c6ea9ff..a085dda8466 100644 --- a/src/harness/externalCompileRunner.ts +++ b/src/harness/externalCompileRunner.ts @@ -61,7 +61,7 @@ abstract class ExternalCompileRunnerBase extends RunnerBase { fs.unlinkSync(path.join(cwd, "package-lock.json")); } if (fs.existsSync(path.join(cwd, "node_modules"))) { - require("del").sync(path.join(cwd, "node_modules")); + require("del").sync(path.join(cwd, "node_modules"), { force: true }); } const install = cp.spawnSync(`npm`, ["i"], { cwd, timeout, shell: true, stdio }); if (install.status !== 0) throw new Error(`NPM Install for ${directoryName} failed: ${install.stderr.toString()}`);