Skip to content

Commit

Permalink
MSOffice: Make sure that manually provided minimum_os_versions overru…
Browse files Browse the repository at this point in the history
…le MS provided data (autopkg#483)
  • Loading branch information
choules authored May 14, 2024
1 parent a0582c5 commit dc73554
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion MSOfficeUpdates/MSOfficeMacURLandUpdateInfoProvider.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import re

from autopkglib import ProcessorError
from autopkglib import version_equal_or_greater
from autopkglib.URLGetter import URLGetter

__all__ = ["MSOfficeMacURLandUpdateInfoProvider"]
Expand Down Expand Up @@ -111,7 +112,7 @@
"Teams2": {
"id": "TEAMS21",
"path": "/Applications/Microsoft Teams (work or school).app",
"minimum_os": "10.15",
"minimum_os": "12.0",
},
"CompanyPortal": {
"id": "IMCP01",
Expand Down Expand Up @@ -337,6 +338,16 @@ def get_installer_info(self):
or "10.10.5"
)

# Make sure that the minimum_os_version is at least higher than the pre defined value
if not version_equal_or_greater(
pkginfo["minimum_os_version"],
PROD_DICT[self.env["product"]].get("minimum_os", "10.10.5")
):
pkginfo["minimum_os_version"] = PROD_DICT[self.env["product"]].get(
"minimum_os",
"10.10.5"
)

installs_items = self.get_installs_items(item)
if installs_items:
pkginfo["installs"] = installs_items
Expand Down

0 comments on commit dc73554

Please sign in to comment.