chore: fail build if a command from tsc-watch fails.

This bug was introduced with eba6e7946d
to integrate the compiler_cli into the build properly.

Closes #8480
This commit is contained in:
Tobias Bosch 2016-05-04 20:01:17 -07:00
parent 67ed2e2c0a
commit 119abe7bb9
3 changed files with 9 additions and 4 deletions

View File

@ -18,7 +18,7 @@ cd ../..
echo 'travis_fold:start:test.unit.tools' echo 'travis_fold:start:test.unit.tools'
# Run unit tests in tools # Run unit tests in tools
node ./dist/tools/tsc-watch/ tools triggerCmds node ./dist/tools/tsc-watch/ tools runCmdsOnly
echo 'travis_fold:end:test.unit.tools' echo 'travis_fold:end:test.unit.tools'
@ -26,7 +26,7 @@ echo 'travis_fold:end:test.unit.tools'
echo 'travis_fold:start:test.unit.node' echo 'travis_fold:start:test.unit.node'
# Run unit tests in node # Run unit tests in node
node ./dist/tools/tsc-watch/ node triggerCmds node ./dist/tools/tsc-watch/ node runCmdsOnly
echo 'travis_fold:end:test.unit.node' echo 'travis_fold:end:test.unit.node'

View File

@ -103,8 +103,8 @@ if (platform == 'node') {
if (runMode === 'watch') { if (runMode === 'watch') {
tscWatch.watch(); tscWatch.watch();
} else if (runMode === 'triggerCmds') { } else if (runMode === 'runCmdsOnly') {
tscWatch.triggerCmds(); tscWatch.runCmdsOnly();
} else { } else {
tscWatch.run(); tscWatch.run();
} }

View File

@ -81,6 +81,11 @@ export class TscWatch {
this.watch(); this.watch();
} }
runCmdsOnly() {
this.runOnce = true;
this.triggerCmds();
}
consumeLine(buffer: Buffer, isStdError: boolean) { consumeLine(buffer: Buffer, isStdError: boolean) {
var line = '' + buffer; var line = '' + buffer;
if (contains(line, this.start)) { if (contains(line, this.start)) {