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:42:25 -0500
committereric sciple <ericsciple@users.noreply.github.com>2019-12-10 01:42:25 -0500
commit045a627ec28d9cc057fbee592497ad8c64052a11 (patch)
tree8f1a96303c801ee1d0ab4af2af03ba0383c7c3d4 /src/github-api-helper.ts
parentc1a1d148e0b65ab387bb7959144d6822613c954a (diff)
.
Diffstat (limited to 'src/github-api-helper.ts')
-rw-r--r--src/github-api-helper.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/github-api-helper.ts b/src/github-api-helper.ts
index b20d863..e0f0cdc 100644
--- a/src/github-api-helper.ts
+++ b/src/github-api-helper.ts
@@ -32,7 +32,7 @@ export async function downloadRepository(
// await fs.promises.writeFile(archivePath, raw)
// Get the archive URL using the REST API
- let archiveUrl = retryHelper.execute(async () => {
+ await retryHelper.execute(async () => {
// Prepare the archive stream
core.debug(`Preparing the archive stream: ${archivePath}`)
await io.rmRF(archivePath)
@@ -142,16 +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)
+ // response.pipe(fileStream)
})
} catch (err) {
reject(err)