Skip to content

Commit 1bd1899

Browse files
committed
Don't bail wrongly in tsc -b -w
1 parent 9d3bc1b commit 1bd1899

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/tsc/tsc.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,14 @@ namespace ts {
5858
message: report,
5959
errorDiagnostic: d => reportDiag(d)
6060
};
61-
return sys.exit(performBuild(args.slice(1), createCompilerHost({}), buildHost, sys));
61+
const result = performBuild(args.slice(1), createCompilerHost({}), buildHost, sys);
62+
// undefined = in watch mode, do not exit
63+
if (result !== undefined) {
64+
return sys.exit(result);
65+
}
66+
else {
67+
return;
68+
}
6269
}
6370

6471
const commandLine = parseCommandLine(args);

0 commit comments

Comments
 (0)