mirror of
https://github.com/danbulant/docker-compose
synced 2026-06-20 07:01:23 +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();
|
result.err += chunk.toString();
|
||||||
});
|
});
|
||||||
|
|
||||||
childProc.on('close', (exitCode, _) => {
|
childProc.on('exit', exitCode => {
|
||||||
result.exitCode = exitCode;
|
result.exitCode = exitCode
|
||||||
|
})
|
||||||
|
|
||||||
|
childProc.on('close', () => {
|
||||||
resolve(result);
|
resolve(result);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue