Improve handling of exceptions which should trigger retrying an operation

This commit is contained in:
Jonas Lochmann 2021-03-08 01:00:00 +01:00
parent 21d7fa839f
commit 828399ec14
No known key found for this signature in database
GPG key ID: 8B8C9AEE10FA5B36
8 changed files with 285 additions and 134 deletions

View file

@ -24,7 +24,7 @@ function startMainApp(env) {
return new Promise((resolve, reject) => {
const task = spawn('node', [initPath], {
stdio: ['inherit', 'pipe', 'inherit'],
env: { ...process.env, PORT: 0 /* random port */ }
env: { ...process.env, PORT: 0 /* random port */, ...env }
})
task.on('exit', () => reject(new Error('task terminated too early')))