Remove package-lock.json before npm install
This commit is contained in:
parent
88a31d6096
commit
5e5b5652ed
1 changed files with 3 additions and 0 deletions
|
@ -37,6 +37,9 @@ class DefinitelyTypedRunner extends RunnerBase {
|
|||
const cwd = path.join(__dirname, "../../", DefinitelyTypedRunner.testDir, directoryName);
|
||||
const timeout = 600000; // 600s = 10 minutes
|
||||
if (fs.existsSync(path.join(cwd, "package.json"))) {
|
||||
if (fs.existsSync(path.join(cwd, "package-lock.json"))) {
|
||||
fs.unlinkSync(path.join(cwd, "package-lock.json"));
|
||||
}
|
||||
const stdio = isWorker ? "pipe" : "inherit";
|
||||
const install = cp.spawnSync(`npm`, ["i"], { cwd, timeout, shell: true, stdio });
|
||||
if (install.status !== 0) throw new Error(`NPM Install for ${directoryName} failed!`);
|
||||
|
|
Loading…
Reference in a new issue