mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-02-06 11:10:10 +00:00
Fix errors in getRequestStream
not being propogated
Change-type: patch Signed-off-by: Pagan Gazzard <page@resin.io>
This commit is contained in:
parent
53c7bc622c
commit
71eca70a22
@ -73,19 +73,19 @@ 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)
|
||||||
if (process.platform === 'win32') {
|
if (process.platform === 'win32') {
|
||||||
const readline = (await import('readline')).createInterface({
|
const readline = (await import('readline')).createInterface({
|
||||||
input: process.stdin,
|
input: process.stdin,
|
||||||
output: process.stdout,
|
output: process.stdout,
|
||||||
});
|
});
|
||||||
|
|
||||||
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
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user