mirror of
https://github.com/danbulant/docker-compose
synced 2026-05-19 20:38:35 +00:00
Grab exit code from 'exit' event of the child process
This commit is contained in:
parent
d13a85bd76
commit
3a8b74665d
1 changed files with 5 additions and 2 deletions
7
index.js
7
index.js
|
|
@ -80,8 +80,11 @@ const execCompose = (command, args, options) => new Promise((resolve, reject) =>
|
|||
result.err += chunk.toString();
|
||||
});
|
||||
|
||||
childProc.on('close', (exitCode, _) => {
|
||||
result.exitCode = exitCode;
|
||||
childProc.on('exit', exitCode => {
|
||||
result.exitCode = exitCode
|
||||
})
|
||||
|
||||
childProc.on('close', () => {
|
||||
resolve(result);
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue