chore: refactors mapOS func.

Signed-off-by: Dmitry Kisler <admin@dkisler.com>
This commit is contained in:
Dmitry Kisler 2023-10-12 17:39:39 +02:00
parent 09232cf9d9
commit ff4f92709b
No known key found for this signature in database
GPG key ID: 46C0A987D58548F6
2 changed files with 8 additions and 8 deletions

8
dist/index.js vendored
View file

@ -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) {

View file

@ -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) {