Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds a check for missing installer items in pkginfo files #66

Merged

Conversation

AaronBurchfield
Copy link
Contributor

This new check will detect pkginfo files that specify installer items that do not exist. We also identify installer items with file paths that are not the same case as the item on disk, since most Linux filesystems and web servers are case-sensitive by default and will fail to serve these files.

@homebysix homebysix changed the base branch from main to 1.14.0 November 18, 2023 11:30
@homebysix homebysix merged commit 6517fe1 into homebysix:1.14.0 Nov 18, 2023
@homebysix
Copy link
Owner

@AaronBurchfield - I'm getting this traceback on my Munki repo with this hook change. My repo is not on a case-sensitive filesystem.

Traceback (most recent call last):
  File "/var/folders/0n/svv6yz7d5qlf59695s39bnx40000gn/T/tmpficw_tv8/repotfuceba2/py_env-python3.12/bin/check-munki-pkgsinfo", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/private/var/folders/0n/svv6yz7d5qlf59695s39bnx40000gn/T/tmpficw_tv8/repotfuceba2/py_env-python3.12/lib/python3.12/site-packages/pre_commit_hooks/check_munki_pkgsinfo.py", line 139, in main
    os.path.join("pkgs", pkginfo.get("installer_item_location"))
  File "<frozen posixpath>", line 90, in join
  File "<frozen genericpath>", line 164, in _check_arg_types
TypeError: join() argument must be str, bytes, or os.PathLike object, not 'NoneType'

homebysix added a commit that referenced this pull request Nov 20, 2023
@homebysix
Copy link
Owner

Addressed in bb51cf7, which will be part of 1.14.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants