diff --git a/packages/insomnia-app/scripts/build.ts b/packages/insomnia-app/scripts/build.ts index c24a4eb3c2..df67fd4365 100644 --- a/packages/insomnia-app/scripts/build.ts +++ b/packages/insomnia-app/scripts/build.ts @@ -109,7 +109,7 @@ const buildLicenseList = (relSource: string, relDest: string) => new Promise new Promise(resolve => { +const install = (relDir: string) => new Promise((resolve, reject) => { const prefix = path.resolve(__dirname, relDir); const p = childProcess.spawn('npm', ['install', '--production', '--no-optional'], { @@ -127,7 +127,11 @@ const install = (relDir: string) => new Promise(resolve => { p.on('exit', code => { console.log(`child process exited with code ${code}`); - resolve(); + if (code === 0) { + resolve(); + } else { + reject(new Error('[build] failed to install dependencies')); + } }); });