From 135469c3f3111bacce5850aad56d6dc9eeb3b6b4 Mon Sep 17 00:00:00 2001 From: Jonathan Camara Date: Wed, 27 Apr 2022 16:03:29 -0500 Subject: [PATCH] fix: output files in download path --- dist/index.js | 11 +++++++++++ lib/setup-terraform.js | 11 +++++++++++ 2 files changed, 22 insertions(+) diff --git a/dist/index.js b/dist/index.js index d24d4a3..a434a08 100644 --- a/dist/index.js +++ b/dist/index.js @@ -37,7 +37,18 @@ function mapOS (os) { async function downloadCLI (url) { core.debug(`Downloading Terraform CLI from ${url}`); const pathToCLIZip = await tc.downloadTool(url); + core.info(`Terraform CLI Download Path is ${pathToCLIZip}`) + const files = await readdir(path); + try { + const files = await fs.readdir(pathToCLIZip); + for (const file of files) + core.info(file); + + } catch (error) { + core.error(err); + throw err; + } core.debug('Extracting Terraform CLI zip file'); const pathToCLI = await tc.extractZip(pathToCLIZip); diff --git a/lib/setup-terraform.js b/lib/setup-terraform.js index fcb769c..acdd6b4 100644 --- a/lib/setup-terraform.js +++ b/lib/setup-terraform.js @@ -31,7 +31,18 @@ function mapOS (os) { async function downloadCLI (url) { core.debug(`Downloading Terraform CLI from ${url}`); const pathToCLIZip = await tc.downloadTool(url); + core.info(`Terraform CLI Download Path is ${pathToCLIZip}`) + const files = await readdir(path); + try { + const files = await fs.readdir(pathToCLIZip); + for (const file of files) + core.info(file); + + } catch (error) { + core.error(err); + throw err; + } core.debug('Extracting Terraform CLI zip file'); const pathToCLI = await tc.extractZip(pathToCLIZip);