Fixes #43: OpenTofu 1.6 can no longer be downloaded (#44)

* Fixes #43: OpenTofu 1.6 can no longer be downloaded

Signed-off-by: AbstractionFactory <179820029+abstractionfactory@users.noreply.github.com>

* More sane self-test

Signed-off-by: AbstractionFactory <179820029+abstractionfactory@users.noreply.github.com>

---------

Signed-off-by: AbstractionFactory <179820029+abstractionfactory@users.noreply.github.com>
This commit is contained in:
AbstractionFactory 2024-12-10 15:04:33 +01:00 committed by GitHub
parent 12f4debbf6
commit 592200bd4b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 177 additions and 398 deletions

View file

@ -48,7 +48,7 @@ async function downloadAndExtractCLI (url) {
if (os.platform().startsWith('win')) {
core.debug(`OpenTofu CLI Download Path is ${pathToCLIZip}`);
const fixedPathToCLIZip = `${pathToCLIZip}.zip`;
io.mv(pathToCLIZip, fixedPathToCLIZip);
await io.mv(pathToCLIZip, fixedPathToCLIZip);
core.debug(`Moved download to ${fixedPathToCLIZip}`);
pathToCLI = await tc.extractZip(fixedPathToCLIZip);
} else {
@ -105,7 +105,7 @@ async function addCredentials (credentialsHostname, credentialsToken, osPlat) {
credentials "${credentialsHostname}" {
token = "${credentialsToken}"
}`.trim();
// eslint-enable
// eslint-enable
// default to OS-specific path
let credsFile = osPlat === 'win32'