Skip to content

Commit b4e13b6

Browse files
committed
Don't npm install the parent project with no args
1 parent 70b902e commit b4e13b6

File tree

4 files changed

+13
-489
lines changed

4 files changed

+13
-489
lines changed

src/testRunner/externalCompileRunner.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ abstract class ExternalCompileRunnerBase extends RunnerBase {
7575
exec("npm", ["i", "--ignore-scripts"], { cwd, timeout: timeout / 2 }); // NPM shouldn't take the entire timeout - if it takes a long time, it should be terminated and we should log the failure
7676
}
7777
const args = [path.join(Harness.IO.getWorkspaceRoot(), "built/local/tsc.js")];
78-
if (types) {
78+
if (types?.length) {
7979
args.push("--types", types.join(","));
8080
// Also actually install those types (for, eg, the js projects which need node)
8181
exec("npm", ["i", ...types.map(t => `@types/${t}`), "--no-save", "--ignore-scripts"], { cwd: originalCwd, timeout: timeout / 2 }); // NPM shouldn't take the entire timeout - if it takes a long time, it should be terminated and we should log the failure

0 commit comments

Comments
 (0)