Repository navigation
Support replacing root owned applications for install - #56
Conversation
|
Can't we use |
|
It would make Squirrel framework less “drag and drop” to include and use but it does let us make the job persistent which could be an advantage,
It would also need cooperation between the application and helper tool’s Info.plist, we can craft a requirement string for the helper tool which matches all applications, just make the requirement test Without needing the job persistence yet I’d say we hold off on |
There was a problem hiding this comment.
Can you add some punctuation/capitalization here so it looks nice in a (hypothetical) documentation generator?
|
@keithduncan Based on that, I don't think we should use What's the behavior here if the user rejects privilege escalation? Will they keep getting prompted in the current session or future sessions? I don't really even know what the desirable behavior is. |
|
@jspahrsummers if they reject an error will bubble up from the authorization API, next time the install is attempted they’ll get prompted again which would be on next quit of the host application. Should we include some recording of ignored updates in the framework? 💂♂️ |
This controls whether ShipIt is added to the user’s or system’s launchd domain, and determines whether it’s run as the user or root.
The framework determines whether to use a privileged ShipIt based on whether it can write to the target location, I tested that this can replace root:wheel owned test applications The tests statically use a nonprivileged helper because Authorization prompts for username/password. The username/password can be provided to the authorization API but we'd need to know them in advance, perhaps through environment variables. Other than that I’m not sure how to test this.
There was a problem hiding this comment.
The system adds more to the prompt we provide and it gets quite wordy
How about cheating, then, and using a prompt like this (verbatim):
To automatically update itself,
Or, if we don't want to depend on the format staying the same:
An update is ready to install.
I dunno, it definitely sounds duplicative right now.
I dunno. I don't want to pester users, but we also want to keep the update in the forefront of their mind. Maybe we could stop after 2 or 3 attempts? @github/mac Any thoughts on this? |
👍 as long as we reset it for subsequent updates. |
👍 on limiting this for automatic updates, but it should also differentiate user initiated updates and always prompt for those, i.e. in GHfM when clicking “Relaunch” |
|
I'm still interesting in making the prompt less annoying, but prompting every time is still better than prompting no times, so I'ma merge this. |
Support replacing root owned applications for install

Fixes #54
Tests for this will be tricky, see the commit messages, but it would be worth figuring something out.