Skip to content

Commit

Permalink
Fix for checks not failing on compilation error (#1068)
Browse files Browse the repository at this point in the history
* use npx
* fix build not failing on compile error
  • Loading branch information
merlynomsft authored Sep 25, 2024
1 parent a56dfec commit 89c945c
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions node/make.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ var rp = function (relPath) {
var buildPath = path.join(__dirname, '_build');
var testPath = path.join(__dirname, '_test');

if (process.env['TF_BUILD']) {
// the CI controls the version of node, so it runs using "node make.js test" instead of "npm test"
// update the PATH when running during CI
buildutils.addPath(path.join(__dirname, 'node_modules', '.bin'));
}

target.clean = function () {
rm('-Rf', buildPath);
rm('-Rf', testPath);
Expand All @@ -26,7 +20,8 @@ target.build = function() {
target.clean();
target.loc();

run('tsc --outDir ' + buildPath);
run('npx tsc -v');
run('npx tsc --outDir ' + buildPath);
cp(rp('package.json'), buildPath);
cp(rp('package-lock.json'), buildPath);
cp(rp('README.md'), buildPath);
Expand Down Expand Up @@ -71,9 +66,11 @@ target.loc = function() {
process.on('uncaughtException', err => {
console.error(`Uncaught exception: ${err.message}`);
console.debug(err.stack);
exit(1);
});

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

0 comments on commit 89c945c

Please sign in to comment.