mirror of
https://github.com/hashicorp/setup-terraform.git
synced 2025-12-27 05:23:37 +00:00
fix: see if adding the extension fixes the problem
This commit is contained in:
parent
3ea2f56085
commit
e5e4b2086f
2 changed files with 6 additions and 20 deletions
13
dist/index.js
vendored
13
dist/index.js
vendored
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue