From 5704a917d1c3e390de9c48b8c7ddde8cda632cdd Mon Sep 17 00:00:00 2001 From: Austin Sasko Date: Mon, 14 Mar 2022 15:36:37 -0400 Subject: [PATCH] Invert naming to improve readability --- src/download-artifact.ts | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/download-artifact.ts b/src/download-artifact.ts index 31a65ce..e459a2f 100644 --- a/src/download-artifact.ts +++ b/src/download-artifact.ts @@ -8,12 +8,12 @@ async function run(): Promise { try { const name = core.getInput(Inputs.Name, {required: false}) const path = core.getInput(Inputs.Path, {required: false}) - const dontextract = core.getInput(Inputs.Dontextract, {required: false}) - let stayGzipped - if(dontextract == "True") { - stayGzipped = True + const extract = core.getInput(Inputs.Extract, {required: false}) + let extractArtifact + if(extract == "True") { + extractArtifact = True } else { - stayGzipped = False + extractArtifact = False } let resolvedPath @@ -33,7 +33,8 @@ async function run(): Promise { 'Creating an extra directory for each artifact that is being downloaded' ) const downloadResponse = await artifactClient.downloadAllArtifacts( - resolvedPath + resolvedPath, + extractArtifact ) core.info(`There were ${downloadResponse.length} artifacts downloaded`) for (const artifact of downloadResponse) { @@ -51,7 +52,7 @@ async function run(): Promise { name, resolvedPath, downloadOptions, - stayGzipped + extractArtifact ) core.info( `Artifact ${downloadResponse.artifactName} was downloaded to ${downloadResponse.downloadPath}`