Closed meschwartz closed 1 year ago
Thanks for the PR, @meschwartz.
In Terminal, on macOS 13.2.1 (22D68), after first elevating to root
, when executing the following …
osascript -e 'Tell application "system events" to display dialog "Please advise your Support Representative of the following error:\r\rExpected macOS Build '${requiredMinimumBuild}' (or newer), but found macOS '${osVersion}' ('${osBuild}').\r\r" with title "Setup Your Mac: Detected Outdated Operating System" buttons {"Open Software Update"} with icon caution'
… I observe:
36:295: execution error: Not authorized to send Apple events to System Events. (-1743)
Also, in a single test of Mac OS X 10.15.7 (19H2026), the current command works as expected and your updated command generates the following message:
Oh, interesting... I might need to do some more testing. It looks like we have a config profile in place that gives Terminal the PPPC permissions for systemevents, so I think that's why we're not seeing that dialog.
When you tested on Catalina, were you running the script via Jamf? (We only saw the crash when running via Jamf; not when running it directly from Terminal.)
Ah … OK.
I'm only testing via Terminal; our pre-Big Sur Macs can only see two policies in Self Service:
@meschwartz:
Unless you have any objections, I'd like to close this PR.
Please advise. Thanks.
Yes, you can go ahead and close it. We get so few machines with Catalina or older it's been such a low priority to do any testing with it. Thanks!
(Oh it looks like I could close it myself... but I'm so inexperienced with github I don't want to do the wrong thing!)
Hehe … thanks, @meschwartz.
My preference is that you close your own request that you no longer need; please let me know if your mileage varies too greatly.
Closing, as this is a fairly niche use-case these days and is too inconvenient to test thoroughly. 🙂
The osascript command crashes when run on pre-Big Sur OSes. This adds
Tell application "system events" to
which works around the issue. This could cause issues on later OSes, so the change is restricted to just the pre-Big Sur block.