Skip to content

Commit 8c20c85

Browse files
committed
Detect incorrect pkginfo key "condition"
1 parent 8f8a32e commit 8c20c85

3 files changed

Lines changed: 6 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ All notable changes to this project will be documented in this file. This projec
1212

1313
## [Unreleased]
1414

15-
Nothing yet.
15+
### Added
16+
17+
- `check-munki-pkgsinfo` now detects the incorrect key `condition` and suggests using `installable_condition` instead.
1618

1719
## [1.20.0] - 2025-08-09
1820

pre_commit_hooks/util.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ def detect_typoed_keys(input_dict: Dict[str, Any], filename: str) -> bool:
102102
"blocking_apps": "blocking_applications",
103103
"blockingapplications": "blocking_applications",
104104
"choices_xml": "installer_choices_xml",
105+
"condition": "installable_condition",
105106
"icon": "icon_name",
106107
"install_check_script": "installcheck_script",
107108
"installer_choices": "installer_choices_xml",

tests/test_util.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ def test_detect_deprecated_keys(self):
106106
def test_detect_typoed_keys(self):
107107
d = {"blocking_apps": 1}
108108
self.assertFalse(detect_typoed_keys(d, "file"))
109+
d = {"condition": "some_condition"}
110+
self.assertFalse(detect_typoed_keys(d, "file"))
109111
d = {"foo": 1}
110112
self.assertTrue(detect_typoed_keys(d, "file"))
111113

0 commit comments

Comments
 (0)