mirror of
https://github.com/strapi/strapi.git
synced 2025-11-13 16:52:18 +00:00
feat: allow custom exit code strapi.stop
You will be allow to customize the exit code for the strapi.stop function. fix #3197
This commit is contained in:
parent
ee0beca5ef
commit
4fd7713d08
@ -280,7 +280,7 @@ class Strapi extends EventEmitter {
|
|||||||
return this.stop();
|
return this.stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
stop() {
|
stop(exitCode = 1) {
|
||||||
// Destroy server and available connections.
|
// Destroy server and available connections.
|
||||||
this.server.destroy();
|
this.server.destroy();
|
||||||
|
|
||||||
@ -289,7 +289,7 @@ class Strapi extends EventEmitter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Kill process.
|
// Kill process.
|
||||||
process.exit(1);
|
process.exit(exitCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
async load() {
|
async load() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user