mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-03 09:49:20 +02:00
Don't use process.exit, throw an error instead
This commit is contained in:
parent
a030a9b234
commit
ac2f99eb75
5 changed files with 7 additions and 15 deletions
|
@ -18,9 +18,7 @@ var checker = require('./initializers/checker')
|
|||
|
||||
var miss = checker.checkConfig()
|
||||
if (miss.length !== 0) {
|
||||
// Do not use logger module
|
||||
console.error('Miss some configurations keys.', { miss: miss })
|
||||
process.exit(0)
|
||||
throw new Error('Miss some configurations keys : ' + miss)
|
||||
}
|
||||
|
||||
checker.createDirectoriesIfNotExist()
|
||||
|
@ -145,7 +143,7 @@ peertubeCrypto.createCertsIfNotExist(function (err) {
|
|||
}
|
||||
|
||||
function exitGracefullyOnSignal () {
|
||||
process.exit()
|
||||
process.exit(-1)
|
||||
}
|
||||
|
||||
process.on('exit', cleanForExit)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue