Fix errors in getRequestStream not being propogated

Change-type: patch
Signed-off-by: Pagan Gazzard <page@resin.io>
This commit is contained in:
Pagan Gazzard 2018-08-14 18:04:36 -07:00
parent 53c7bc622c
commit 71eca70a22

View File

@ -73,7 +73,6 @@ async function getBuilderEndpoint(
export async function startRemoteBuild(build: RemoteBuild): Promise<void> { export async function startRemoteBuild(build: RemoteBuild): Promise<void> {
const Bluebird = await import('bluebird'); const Bluebird = await import('bluebird');
return new Bluebird(async (resolve, reject) => {
const stream = await getRequestStream(build); const stream = await getRequestStream(build);
// Special windows handling (win64 also reports win32) // Special windows handling (win64 also reports win32)
@ -86,6 +85,7 @@ export async function startRemoteBuild(build: RemoteBuild): Promise<void> {
readline.on('SIGINT', () => process.emit('SIGINT')); readline.on('SIGINT', () => process.emit('SIGINT'));
} }
return new Bluebird((resolve, reject) => {
// Setup interrupt handlers so we can cancel the build if the user presses // Setup interrupt handlers so we can cancel the build if the user presses
// ctrl+c // ctrl+c