diff options
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) |
