mirror of
https://github.com/hashicorp/setup-terraform.git
synced 2025-12-27 13:33:37 +00:00
Fix require
This commit is contained in:
parent
5cffe1cf24
commit
ffb5fd48b4
2 changed files with 44 additions and 115 deletions
|
|
@ -1,5 +1,3 @@
|
|||
import { getRelease } from '@hashicorp/js-releases';
|
||||
|
||||
// Node.js core
|
||||
const fs = require('fs').promises;
|
||||
const os = require('os');
|
||||
|
|
@ -9,6 +7,7 @@ const path = require('path');
|
|||
const core = require('@actions/core');
|
||||
const tc = require('@actions/tool-cache');
|
||||
const io = require('@actions/io');
|
||||
const releases = require('@hashicorp/js-releases');
|
||||
|
||||
// arch in [arm, x32, x64...] (https://nodejs.org/api/os.html#os_os_arch)
|
||||
// return value in [amd64, 386, arm]
|
||||
|
|
@ -118,7 +117,7 @@ async function run () {
|
|||
const osArch = os.arch();
|
||||
|
||||
core.debug(`Finding releases for Terraform version ${version}`);
|
||||
const release = getRelease('terraform', version);
|
||||
const release = await releases.getRelease('terraform', version);
|
||||
const platform = mapOS(osPlatform);
|
||||
const arch = mapArch(osArch);
|
||||
core.debug(`Getting build for Terraform version ${release.version}: ${platform} ${arch}`);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue