Skip to content

Commit 5e5b565

Browse files
committed
Remove package-lock.json before npm install
1 parent 88a31d6 commit 5e5b565

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/harness/dtRunner.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ class DefinitelyTypedRunner extends RunnerBase {
3737
const cwd = path.join(__dirname, "../../", DefinitelyTypedRunner.testDir, directoryName);
3838
const timeout = 600000; // 600s = 10 minutes
3939
if (fs.existsSync(path.join(cwd, "package.json"))) {
40+
if (fs.existsSync(path.join(cwd, "package-lock.json"))) {
41+
fs.unlinkSync(path.join(cwd, "package-lock.json"));
42+
}
4043
const stdio = isWorker ? "pipe" : "inherit";
4144
const install = cp.spawnSync(`npm`, ["i"], { cwd, timeout, shell: true, stdio });
4245
if (install.status !== 0) throw new Error(`NPM Install for ${directoryName} failed!`);

0 commit comments

Comments
 (0)