fix(node): only tag bare .exe as variant, not .msi/.pkg

.msi and .pkg are standard package formats that the extension
already identifies. Only the bare node.exe (no npm) needs a
variant tag to exclude it.
This commit is contained in:
AJ ONeal
2026-03-10 17:03:04 -06:00
parent c45e54a69b
commit cba699a952

View File

@@ -4,17 +4,11 @@ import "github.com/webinstall/webi-installers/internal/storage"
// TagVariants tags node-specific build variants.
//
// - .msi — Windows package format (msiexec /a to extract)
// - .pkg — macOS package format (pkgutil --expand-full to extract)
// - .exe — bare node.exe without npm, too minimal to be useful
// The bare .exe is just node.exe without npm — too minimal to be useful.
// .msi and .pkg are standard package formats and need no special tagging.
func TagVariants(assets []storage.Asset) {
for i := range assets {
switch assets[i].Format {
case ".msi":
assets[i].Variants = append(assets[i].Variants, "msi")
case ".pkg":
assets[i].Variants = append(assets[i].Variants, "pkg")
case ".exe":
if assets[i].Format == ".exe" {
assets[i].Variants = append(assets[i].Variants, "bare-exe")
}
}