We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 39239cd commit fb79a37Copy full SHA for fb79a37
src/utils.js
@@ -1,3 +1,5 @@
1
+import { ChildProcess } from 'child_process';
2
+
3
import { StackConfig, StackManager } from 'stacker-core';
4
5
export function getStackConfig(path = process.cwd()) {
@@ -15,7 +17,11 @@ export async function getStackManager(path = process.cwd()) {
15
17
export function catchErrors(handle) {
16
18
return async function (args, options, logger) {
19
try {
- await handle(args, options, logger);
20
+ const result = await handle(args, options, logger);
21
22
+ if (result instanceof ChildProcess) {
23
+ result.on('exit', code => process.exit(code));
24
+ }
25
} catch (error) {
26
logger.error(error.message);
27
}
0 commit comments