Skip to content

Commit

Permalink
Merge branch 'main' into lex111/wds-4-imp
Browse files Browse the repository at this point in the history
  • Loading branch information
lex111 authored Oct 28, 2021
2 parents 25f376d + 768600e commit 0cd6e56
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/docusaurus/src/commands/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ export default async function build(
// TODO what's the purpose of this arg ?
forceTerminate: boolean = true,
): Promise<string> {
['SIGINT', 'SIGTERM'].forEach((sig) => {
process.on(sig, () => process.exit());
});

async function tryToBuildLocale({
locale,
isLastLocale,
Expand Down
2 changes: 1 addition & 1 deletion packages/docusaurus/src/commands/start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ export default async function start(
});

['SIGINT', 'SIGTERM'].forEach((sig) => {
process.on(sig as NodeJS.Signals, () => {
process.on(sig, () => {
devServer.stop();
process.exit();
});
Expand Down

0 comments on commit 0cd6e56

Please sign in to comment.