mpanighetti / install-or-defer

A framework for prompting users of Jamf Pro-managed Macs to install Apple software updates.
Apache License 2.0
148 stars 28 forks source link

Python errors during SU_CATALOG, SKIP_DEFERRAL, and MAX_DEFERRAL_TIME_CUSTOM checks if Python2 is installed via Homebrew #26

Closed mpanighetti closed 5 years ago

mpanighetti commented 5 years ago

If Python2 is installed via Homebrew (and likely through other third-party install mechanisms), the SU_CATALOG, SKIP_DEFERRAL, and MAX_DEFERRAL_TIME_CUSTOM checks fail with import errors while attempting to import the Foundation and CoreFoundation modules. This is likely expected behavior as those modules are only included by default in the macOS Python install.

The simple fix would be to place /usr/bin in the $PATH definitions, ahead of paths where third-party Python2 installs might be present, so that the script will only use the system Python2 install and successfully make the requisite calls. I'll submit a pull request shortly with this change, just wanted to have an issue to attach to the PR.

mpanighetti commented 5 years ago

Fixed in #27.