fix: see if adding the extension fixes the problem

This commit is contained in:
Jonathan Camara 2022-04-27 16:20:22 -05:00
parent 3ea2f56085
commit e5e4b2086f
No known key found for this signature in database
GPG key ID: E87744B8CC664ACD
2 changed files with 6 additions and 20 deletions

13
dist/index.js vendored
View file

@ -39,18 +39,11 @@ async function downloadCLI (url) {
const pathToCLIZip = await tc.downloadTool(url);
core.info(`Terraform CLI Download Path is ${pathToCLIZip}`)
try {
const files = await fs.readdir(pathToCLIZip);
for (const file of files)
core.info(file);
} catch (error) {
core.error(error);
throw error;
}
fixedPathToCLIZip=`${pathToCLIZip}.zip`
io.mv(pathToCLIZip,fixedPathToCLIZip)
core.debug('Extracting Terraform CLI zip file');
const pathToCLI = await tc.extractZip(pathToCLIZip);
const pathToCLI = await tc.extractZip(fixedPathToCLIZip);
core.debug(`Terraform CLI path is ${pathToCLI}.`);
if (!pathToCLIZip || !pathToCLI) {

View file

@ -33,18 +33,11 @@ async function downloadCLI (url) {
const pathToCLIZip = await tc.downloadTool(url);
core.info(`Terraform CLI Download Path is ${pathToCLIZip}`)
try {
const files = await fs.readdir(pathToCLIZip);
for (const file of files)
core.info(file);
} catch (error) {
core.error(error);
throw error;
}
fixedPathToCLIZip=`${pathToCLIZip}.zip`
io.mv(pathToCLIZip,fixedPathToCLIZip)
core.debug('Extracting Terraform CLI zip file');
const pathToCLI = await tc.extractZip(pathToCLIZip);
const pathToCLI = await tc.extractZip(fixedPathToCLIZip);
core.debug(`Terraform CLI path is ${pathToCLI}.`);
if (!pathToCLIZip || !pathToCLI) {