This commit is contained in:
eric sciple 2019-12-09 20:07:49 -05:00
parent 54a7542872
commit 35bb830cfd
2 changed files with 3 additions and 3 deletions

4
dist/index.js vendored
View file

@ -8121,7 +8121,7 @@ function downloadRepository(accessToken, owner, repo, ref, repositoryPath) {
assert.ok(runnerTemp, 'RUNNER_TEMP not defined'); assert.ok(runnerTemp, 'RUNNER_TEMP not defined');
const archiveFile = path.join(runnerTemp, 'checkout-archive.tar.gz'); const archiveFile = path.join(runnerTemp, 'checkout-archive.tar.gz');
yield io.rmRF(archiveFile); yield io.rmRF(archiveFile);
yield fs.promises.writeFile(archiveFile, new Buffer(response.data)); yield fs.promises.writeFile(archiveFile, Buffer.from(response.data));
yield exec.exec(`ls -la "${archiveFile}"`, [], { yield exec.exec(`ls -la "${archiveFile}"`, [], {
cwd: repositoryPath cwd: repositoryPath
}); });
@ -8138,7 +8138,7 @@ function downloadRepository(accessToken, owner, repo, ref, repositoryPath) {
core.info(`Resolved ${extraDirectoryName}`); // contains the short SHA core.info(`Resolved ${extraDirectoryName}`); // contains the short SHA
const tempRepositoryPath = path.join(extractPath, extraDirectoryName); const tempRepositoryPath = path.join(extractPath, extraDirectoryName);
// Move the files // Move the files
for (const fileName of (yield fs.promises.readdir(tempRepositoryPath))) { for (const fileName of yield fs.promises.readdir(tempRepositoryPath)) {
const sourcePath = path.join(tempRepositoryPath, fileName); const sourcePath = path.join(tempRepositoryPath, fileName);
const targetPath = path.join(repositoryPath, fileName); const targetPath = path.join(repositoryPath, fileName);
yield io.mv(sourcePath, targetPath); yield io.mv(sourcePath, targetPath);

View file

@ -43,7 +43,7 @@ export async function downloadRepository(
assert.ok(runnerTemp, 'RUNNER_TEMP not defined') assert.ok(runnerTemp, 'RUNNER_TEMP not defined')
const archiveFile = path.join(runnerTemp, 'checkout-archive.tar.gz') const archiveFile = path.join(runnerTemp, 'checkout-archive.tar.gz')
await io.rmRF(archiveFile) await io.rmRF(archiveFile)
await fs.promises.writeFile(archiveFile, new Buffer(response.data)) await fs.promises.writeFile(archiveFile, Buffer.from(response.data))
await exec.exec(`ls -la "${archiveFile}"`, [], { await exec.exec(`ls -la "${archiveFile}"`, [], {
cwd: repositoryPath cwd: repositoryPath
} as ExecOptions) } as ExecOptions)