mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 02:39:33 +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
|
@ -36,9 +36,7 @@ function createDirectoriesIfNotExist () {
|
|||
try {
|
||||
mkdirp.sync(path.join(__dirname, '..', dir))
|
||||
} catch (error) {
|
||||
// Do not use logger
|
||||
console.error('Cannot create ' + path + ':' + error)
|
||||
process.exit(0)
|
||||
throw new Error('Cannot create ' + path + ':' + error)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue