mirror of
https://github.com/opentofu/setup-opentofu.git
synced 2025-12-31 15:02:19 +00:00
chore: refactors mapOS func.
Signed-off-by: Dmitry Kisler <admin@dkisler.com>
This commit is contained in:
parent
09232cf9d9
commit
ff4f92709b
2 changed files with 8 additions and 8 deletions
8
dist/index.js
vendored
8
dist/index.js
vendored
|
|
@ -139,10 +139,10 @@ function mapArch (arch) {
|
||||||
// os in [darwin, linux, win32...] (https://nodejs.org/api/os.html#os_os_platform)
|
// os in [darwin, linux, win32...] (https://nodejs.org/api/os.html#os_os_platform)
|
||||||
// return value in [darwin, linux, windows]
|
// return value in [darwin, linux, windows]
|
||||||
function mapOS (os) {
|
function mapOS (os) {
|
||||||
const mappings = {
|
if (os === 'win32') {
|
||||||
win32: 'windows'
|
return 'windows';
|
||||||
};
|
}
|
||||||
return mappings[os] || os;
|
return os;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function downloadCLI (url) {
|
async function downloadCLI (url) {
|
||||||
|
|
|
||||||
|
|
@ -28,10 +28,10 @@ function mapArch (arch) {
|
||||||
// os in [darwin, linux, win32...] (https://nodejs.org/api/os.html#os_os_platform)
|
// os in [darwin, linux, win32...] (https://nodejs.org/api/os.html#os_os_platform)
|
||||||
// return value in [darwin, linux, windows]
|
// return value in [darwin, linux, windows]
|
||||||
function mapOS (os) {
|
function mapOS (os) {
|
||||||
const mappings = {
|
if (os === 'win32') {
|
||||||
win32: 'windows'
|
return 'windows';
|
||||||
};
|
}
|
||||||
return mappings[os] || os;
|
return os;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function downloadCLI (url) {
|
async function downloadCLI (url) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue