Skip to content

Commit c22a777

Browse files
committed
adding flexibility to check pkgsinfo
1 parent 612b990 commit c22a777

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

pre_commit_hooks/check_munki_pkgsinfo.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ def build_argument_parser():
3535
help="Require a blocking_applications array for pkg installers.",
3636
)
3737
parser.add_argument("filenames", nargs="*", help="Filenames to check.")
38+
parser.add_argument("--munki_repo", default='.',
39+
help="path to local munki repo defaults to '.'")
3840
return parser
3941

4042

@@ -174,7 +176,8 @@ def main(argv=None):
174176
if not any(
175177
(
176178
pkginfo.get("icon_name"),
177-
os.path.isfile("icons/{}.png".format(pkginfo["name"])),
179+
os.path.isfile(os.path.join(args.munki_repo,
180+
"icons/{}.png".format(pkginfo["name"]))),
178181
pkginfo.get("installer_type") == "apple_update_metadata",
179182
)
180183
):

0 commit comments

Comments
 (0)