diff options
| author | eric sciple <ericsciple@users.noreply.github.com> | 2019-12-10 01:40:30 -0500 |
|---|---|---|
| committer | eric sciple <ericsciple@users.noreply.github.com> | 2019-12-10 01:40:30 -0500 |
| commit | c1a1d148e0b65ab387bb7959144d6822613c954a (patch) | |
| tree | 615f0ef8613f3936e97ca3e77c5ccf88047636ca /src/github-api-helper.ts | |
| parent | 4a105ae54b2da526261984b63cdf1e8201c23c26 (diff) | |
.
Diffstat (limited to 'src/github-api-helper.ts')
| -rw-r--r-- | src/github-api-helper.ts | 7 |
1 files changed, 4 insertions, 3 deletions
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<void> { 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) |
