fix: 'quit' command was terminating ungracefully
Massimo Melina committed
Jul 7, 2024 at 17:39 UTC
e5c0961a8be5cf0c44c815467f4fa4490ccd3de0
2 files changed
+2
-2
plugins/updater-disabled/plugin.js
+1
-1
@@ -37,7 +37,7 @@ exports.init = async api => {
37
fs.rename(NEW, UPDATING, err => {
38
if (err) return
39
api.log("exiting for update")
40
- process.exit(0)
40
+ process.emit('SIGTERM')
41
})
42
}, 5000)
43
return {
src/commands.ts
+1
-1
@@ -94,7 +94,7 @@ const commands = {
94
quit: {
95
params: '',
96
cb() {
97
- process.exit(0)
97
+ process.emit('SIGTERM')
98
}
99
},
100
update: {