Read-only mirror — the public repositories of the Forgejo instance, refreshed every 10 minutes. The live instance (fg.dieschoenewolke.de) is reachable only over the VPN; clone here with https://git.dieschoenewolke.de/git/<owner>/<repo>.git.
summaryrefslogtreecommitdiff
path: root/src/github-api-helper.ts
diff options
context:
space:
mode:
authoreric sciple <ericsciple@users.noreply.github.com>2019-12-10 01:40:30 -0500
committereric sciple <ericsciple@users.noreply.github.com>2019-12-10 01:40:30 -0500
commitc1a1d148e0b65ab387bb7959144d6822613c954a (patch)
tree615f0ef8613f3936e97ca3e77c5ccf88047636ca /src/github-api-helper.ts
parent4a105ae54b2da526261984b63cdf1e8201c23c26 (diff)
.
Diffstat (limited to 'src/github-api-helper.ts')
-rw-r--r--src/github-api-helper.ts7
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)