From 675d9352145eaf135d133e2f74b579b49e83de9b Mon Sep 17 00:00:00 2001 From: eric sciple Date: Mon, 9 Dec 2019 19:39:01 -0500 Subject: [PATCH] . --- dist/index.js | 12 ++++++------ src/github-api-helper.ts | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/dist/index.js b/dist/index.js index 985bd4f..a516b63 100644 --- a/dist/index.js +++ b/dist/index.js @@ -8110,15 +8110,15 @@ function downloadRepository(accessToken, owner, repo, ref, repositoryPath) { } console.log(`status=${response.status}`); console.log(`headers=${JSON.stringify(response.headers)}`); - console.log(`data=${response.data}`); - console.log(`data=${JSON.stringify(response.data)}`); - for (const key of Object.keys(response.data)) { - console.log(`data['${key}']=${response.data[key]}`); - } + // console.log(`data=${response.data}`) + // console.log(`data=${JSON.stringify(response.data)}`) + // for (const key of Object.keys(response.data)) { + // console.log(`data['${key}']=${response.data[key]}`) + // } const runnerTemp = process.env['RUNNER_TEMP']; assert.ok(runnerTemp, 'RUNNER_TEMP not defined'); const archiveFile = path.join(runnerTemp, 'checkout.tar.gz'); - yield fs.promises.writeFile(archiveFile, response.data); + yield fs.promises.writeFile(archiveFile, new Buffer(response.data)); yield exec.exec(`ls -la "${archiveFile}"`, [], { cwd: repositoryPath }); diff --git a/src/github-api-helper.ts b/src/github-api-helper.ts index 7896967..efabd38 100644 --- a/src/github-api-helper.ts +++ b/src/github-api-helper.ts @@ -34,15 +34,15 @@ export async function downloadRepository( } console.log(`status=${response.status}`) console.log(`headers=${JSON.stringify(response.headers)}`) - console.log(`data=${response.data}`) - console.log(`data=${JSON.stringify(response.data)}`) - for (const key of Object.keys(response.data)) { - console.log(`data['${key}']=${response.data[key]}`) - } + // console.log(`data=${response.data}`) + // console.log(`data=${JSON.stringify(response.data)}`) + // for (const key of Object.keys(response.data)) { + // console.log(`data['${key}']=${response.data[key]}`) + // } const runnerTemp = process.env['RUNNER_TEMP'] as string assert.ok(runnerTemp, 'RUNNER_TEMP not defined') const archiveFile = path.join(runnerTemp, 'checkout.tar.gz') - await fs.promises.writeFile(archiveFile, response.data as Buffer) + await fs.promises.writeFile(archiveFile, new Buffer(response.data)) await exec.exec(`ls -la "${archiveFile}"`, [], { cwd: repositoryPath } as ExecOptions)