mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-12 12:57:11 -06:00
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
This commit is contained in:
parent
be607bd28f
commit
24c2fcc504
@ -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()}`);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user