Skip to content

Commit 1a57d3f

Browse files
committed
error 1 on errors
1 parent f513d73 commit 1a57d3f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

packages/htmldocs/src/cli/index.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ const noop = () => {};
1818
// Silence Node.js deprecation warnings
1919
process.removeAllListeners('warning');
2020

21+
// Monkey patch logger.error to exit with code 1
22+
const originalError = logger.error;
23+
logger.error = (...args: any[]) => {
24+
originalError.apply(logger, args);
25+
process.exit(1);
26+
};
27+
2128
// these environment variables are used on the next app
2229
// this is the most reliable way of communicating these paths through
2330
process.env = {

0 commit comments

Comments
 (0)