Skip to content

Commit 89c945c

Browse files
authored
Fix for checks not failing on compilation error (#1068)
* use npx * fix build not failing on compile error
1 parent a56dfec commit 89c945c

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

node/make.js

+4-7
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,6 @@ var rp = function (relPath) {
1111
var buildPath = path.join(__dirname, '_build');
1212
var testPath = path.join(__dirname, '_test');
1313

14-
if (process.env['TF_BUILD']) {
15-
// the CI controls the version of node, so it runs using "node make.js test" instead of "npm test"
16-
// update the PATH when running during CI
17-
buildutils.addPath(path.join(__dirname, 'node_modules', '.bin'));
18-
}
19-
2014
target.clean = function () {
2115
rm('-Rf', buildPath);
2216
rm('-Rf', testPath);
@@ -26,7 +20,8 @@ target.build = function() {
2620
target.clean();
2721
target.loc();
2822

29-
run('tsc --outDir ' + buildPath);
23+
run('npx tsc -v');
24+
run('npx tsc --outDir ' + buildPath);
3025
cp(rp('package.json'), buildPath);
3126
cp(rp('package-lock.json'), buildPath);
3227
cp(rp('README.md'), buildPath);
@@ -71,9 +66,11 @@ target.loc = function() {
7166
process.on('uncaughtException', err => {
7267
console.error(`Uncaught exception: ${err.message}`);
7368
console.debug(err.stack);
69+
exit(1);
7470
});
7571

7672
process.on('unhandledRejection', err => {
7773
console.error(`Unhandled rejection: ${err.message}`);
7874
console.debug(err.stack);
75+
exit(1);
7976
});

0 commit comments

Comments
 (0)