diff --git a/src/compiler.ts b/src/compiler.ts index d229fa7..1080aa4 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -139,7 +139,13 @@ export class NexeCompiler { stdio: 'ignore' }) .once('error', reject) - .once('close', resolve) + .once('close', (code: number) => { + if (code != 0) { + const error = `${command} ${args.join(' ')} exited with code: ${code}` + reject(new Error(error)) + } + resolve() + }) }) } diff --git a/src/steps/cli.ts b/src/steps/cli.ts index 4c59831..503c06e 100644 --- a/src/steps/cli.ts +++ b/src/steps/cli.ts @@ -41,8 +41,6 @@ export default async function cli(compiler: NexeCompiler, next: () => Promise Promise