Skip to content

Commit 06fe824

Browse files
committed
bugfix: make tsc invocation work on windows as well
1 parent 6e05aed commit 06fe824

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

test/utils/tsc.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
import util from "util";
22

3-
const exec = util.promisify(require('child_process').exec);
4-
const pathToTsc = `./node_modules/.bin/tsc`;
3+
const exec = util.promisify(require("child_process").exec);
54

65
export async function typecheck(pathToIndex: string) {
7-
await exec(`${pathToTsc} ${pathToIndex} --noEmit`);
6+
const cmd = `tsc ${pathToIndex} --noEmit`;
7+
await exec(cmd, {
8+
env: process.env,
9+
});
810
}

0 commit comments

Comments
 (0)