mirror of
https://github.com/opentofu/setup-opentofu.git
synced 2026-11-28 19:14:22 +01:00
chore: refactors mapOS func.
Signed-off-by: Dmitry Kisler <admin@dkisler.com>
This commit is contained in:
2 files changed
+8
-8
No files matched your search
Vendored
+4
-4
@@ -139,10 +139,10 @@ function mapArch (arch) {
|
||||
// os in [darwin, linux, win32...] (https://nodejs.org/api/os.html#os_os_platform)
|
||||
// return value in [darwin, linux, windows]
|
||||
function mapOS (os) {
|
||||
const mappings = {
|
||||
win32: 'windows'
|
||||
};
|
||||
return mappings[os] || os;
|
||||
if (os === 'win32') {
|
||||
return 'windows';
|
||||
}
|
||||
return os;
|
||||
}
|
||||
|
||||
async function downloadCLI (url) {
|
||||
|
||||
+4
-4
@@ -28,10 +28,10 @@ function mapArch (arch) {
|
||||
// os in [darwin, linux, win32...] (https://nodejs.org/api/os.html#os_os_platform)
|
||||
// return value in [darwin, linux, windows]
|
||||
function mapOS (os) {
|
||||
const mappings = {
|
||||
win32: 'windows'
|
||||
};
|
||||
return mappings[os] || os;
|
||||
if (os === 'win32') {
|
||||
return 'windows';
|
||||
}
|
||||
return os;
|
||||
}
|
||||
|
||||
async function downloadCLI (url) {
|
||||
|
||||
Reference in new issue
Block a user