fix: output files in download path

This commit is contained in:
Jonathan Camara 2022-04-27 16:03:29 -05:00
parent 678377bd80
commit 135469c3f3
No known key found for this signature in database
GPG key ID: E87744B8CC664ACD
2 changed files with 22 additions and 0 deletions

11
dist/index.js vendored
View file

@ -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);