diff --git a/lib/download-release-archive.js b/lib/download-release-archive.js index bad95b0..4f86e1d 100644 --- a/lib/download-release-archive.js +++ b/lib/download-release-archive.js @@ -19,7 +19,7 @@ function download_archive(owner, repo, ref) { const tag = "v1.0.0"; const tarFile = `${tag}.tar.gz`; console.log("Calling API ..."); - octokit.repos.getArchiveLink({ + yield octokit.repos.getArchiveLink({ owner, repo, archive_format, diff --git a/src/download-release-archive.ts b/src/download-release-archive.ts index 10f6f68..be83ea9 100644 --- a/src/download-release-archive.ts +++ b/src/download-release-archive.ts @@ -15,13 +15,13 @@ async function download_archive(owner, repo, ref ) { const tarFile = `${tag}.tar.gz`; console.log("Calling API ..."); - octokit.repos.getArchiveLink({ + await octokit.repos.getArchiveLink({ owner, repo, archive_format, ref }).then(( { data }) => { - fs.writeFile(tarFile, Buffer.from(data), function(err){ + fs.writeFile(tarFile, Buffer.from(data), function(err){ if(err) { return console.log(err); }