mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-19 09:37:43 +02:00
fix: handle SIGTERM in build command (#5813)
This commit is contained in:
parent
96da25e422
commit
768600e5d9
2 changed files with 5 additions and 1 deletions
|
@ -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,
|
||||
|
|
|
@ -232,7 +232,7 @@ export default async function start(
|
|||
});
|
||||
|
||||
['SIGINT', 'SIGTERM'].forEach((sig) => {
|
||||
process.on(sig as NodeJS.Signals, () => {
|
||||
process.on(sig, () => {
|
||||
devServer.close();
|
||||
process.exit();
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue