prevent exe from being added to another team when installer already exists and no scripts provided (#28718)

> For #28558, part 2

# Checklist for submitter

If some of the following don't apply, delete the relevant line.

<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [x] Added/updated automated tests
- [x] A detailed QA plan exists on the associated ticket (if it isn't
there, work with the product group's QA engineer to add it)
- [x] Manual QA for all new/changed functionality
- [x] For unreleased bug fixes in a release candidate, confirmed that
the fix is not expected to adversely impact load test results or alerted
the release DRI if additional load testing is needed.
This commit is contained in:
Jahziel Villasana-Espinoza
2025-05-01 10:47:48 -04:00
committed by GitHub
parent f0133008a1
commit 3c07f50cb9
2 changed files with 60 additions and 14 deletions
+10
View File
@@ -1761,6 +1761,16 @@ func (svc *Service) softwareBatchUpload(
continue
}
if i.Extension == "exe" {
if p.InstallScript == "" {
return errors.New("Couldn't edit. Install script is required for .exe packages.")
}
if p.UninstallScript == "" {
return errors.New("Couldn't edit. Uninstall script is required for .exe packages.")
}
}
installer.Extension = i.Extension
installer.Filename = i.Filename
installer.Version = i.Version