From c1a1d148e0b65ab387bb7959144d6822613c954a Mon Sep 17 00:00:00 2001 From: eric sciple Date: Tue, 10 Dec 2019 01:40:30 -0500 Subject: . --- src/github-api-helper.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/github-api-helper.ts') diff --git a/src/github-api-helper.ts b/src/github-api-helper.ts index 12ab8e1..b20d863 100644 --- a/src/github-api-helper.ts +++ b/src/github-api-helper.ts @@ -142,15 +142,16 @@ function downloadFile(url: string, fileStream: WriteStream): Promise { return } - response.on('data', chunk => { - fileStream.write(chunk) - }) + // response.on('data', chunk => { + // fileStream.write(chunk) + // }) response.on('end', () => { resolve() }) response.on('error', err => { reject(err) }) + response.pipe(fileStream) }) } catch (err) { reject(err) -- cgit v1.2.3