fix: correctly deduce target from missing data (#16)

This commit is contained in:
Baptiste Augrain
2023-10-15 23:29:10 +02:00
committed by GitHub
parent b9f6aec55d
commit 3b86e082b6

View File

@@ -65,14 +65,17 @@ function validateInput (platform, quality) {
if (!OS.has(os)) return false
if (os === WINDOWS) {
if (arch === X64 && !type) type = SYSTEM
if (!arch && !type) arch = SYSTEM
if (!type) {
type = arch
arch = IA32
}
if (!arch) {
type = SYSTEM
arch = IA32
} else if (TYPES.has(arch)) {
type = arch
arch = IA32
} else {
type = SYSTEM
}
}
if (!TYPES.has(type)) return false
} else if (os === DARWIN) {