-
Notifications
You must be signed in to change notification settings - Fork 125
Idea so macOS installer does not need sudo #164
Comments
Sounds like a great "solution" but how do you do that? The .pkg files are just generated based on the Apple command line tools. Do you have any information on how to achieve this? |
I believe one just has to be judicious about the use of |
Please do! Would love for it to not need a password! :D |
I placed the proper checks in the scripts and the popup remained. Then I did a little investigation into the
But after changing changing
This is what configures the installer to present the option "Install for all users of this computer." It appears that selecting that necessitates administrative authentication. I'll ask Apple developer support for assistance. In the meantime, I've come up with a few options: (Option 1) I suspect that there may be a workaround by installing to a temporary directory, then use the post install script to move the files to (Option 2) Actually, there is also the possibility of setting (Option 3) All else failing, many developers use homebrew for OSS stuff, and especially for CLI. I understand the it's pretty easy to publish a homebrew "bottle" (binary installation package). Not ideal, but given that homebrew is pretty lightweight, IMHO not a bad option. In any event, I'll let you know what I hear about the It's unfortunate that it currently appears that a perfect and easy option doesn't exist. That said, if there isn't a reasonable workaround, I think option 2 is rather nice, since it gives the user the choice to install system-wide (and thus provide admin auth), or install to the home dir (not require any auth, and largely much safer). Option 3 could also be done in conjunction with any of the other options. |
I know a lot of people install through What about removing |
Please don't install Elm with root privs :) It's not 1992 anymore... |
Problem
Many users of the homebrew package manager set the permissions of
/usr/local
and such sosudo
is not required. However, the Elm-Platform installer, e.g.Elm-Platform-0.17.1.pkg
, requires the user to type in their password for administrative access regardless if it already has permission or not. I don't think this is a good security policy.Solution
The installer checks if it has permission to the necessary subdirectories of
/usr/local
. If it does, install without elevating privileges. If it doesn't, prompt user for administrative access, elevate privileges, and install as root.The text was updated successfully, but these errors were encountered: