From 35bb830cfdf8c00447f965060fc1de8276638fc8 Mon Sep 17 00:00:00 2001
From: eric sciple <ericsciple@users.noreply.github.com>
Date: Mon, 9 Dec 2019 20:07:49 -0500
Subject: [PATCH] .

---
 dist/index.js            | 4 ++--
 src/github-api-helper.ts | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dist/index.js b/dist/index.js
index 4a32ea4..8f07a6b 100644
--- a/dist/index.js
+++ b/dist/index.js
@@ -8121,7 +8121,7 @@ function downloadRepository(accessToken, owner, repo, ref, repositoryPath) {
         assert.ok(runnerTemp, 'RUNNER_TEMP not defined');
         const archiveFile = path.join(runnerTemp, 'checkout-archive.tar.gz');
         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}"`, [], {
             cwd: repositoryPath
         });
@@ -8138,7 +8138,7 @@ function downloadRepository(accessToken, owner, repo, ref, repositoryPath) {
         core.info(`Resolved ${extraDirectoryName}`); // contains the short SHA
         const tempRepositoryPath = path.join(extractPath, extraDirectoryName);
         // 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 targetPath = path.join(repositoryPath, fileName);
             yield io.mv(sourcePath, targetPath);
diff --git a/src/github-api-helper.ts b/src/github-api-helper.ts
index f70a2b0..7a41002 100644
--- a/src/github-api-helper.ts
+++ b/src/github-api-helper.ts
@@ -43,7 +43,7 @@ export async function downloadRepository(
   assert.ok(runnerTemp, 'RUNNER_TEMP not defined')
   const archiveFile = path.join(runnerTemp, 'checkout-archive.tar.gz')
   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}"`, [], {
     cwd: repositoryPath
   } as ExecOptions)