Electron-builder: ~/Applications(Install only for me) option is not selected by default even though the UI installer shows selected when pkg is created with allowCurrentUserHome:true

Created on 14 Oct 2017  路  6Comments  路  Source: electron-userland/electron-builder


  • Version: 19.37.0

  • Target: Mac

I am creating a pkg with the config -

"pkg": {
      "allowAnywhere": false,
      "allowCurrentUserHome": true,
      "allowRootDirectory": false
    },

And it DOES create a package that does not require admin password.

But the problem is the "Install only for me" option is not selected by default. I had to manually click "change install location" -> the default selected is "Install for all users on this computer" (even though in the package.json for electron builder I have mentioned "allowRootDirectory": false && even though the UI in the installer shows "install only for me" is selected ) -> Manually click "install only for me" and then the package would install the app without the admin password. And the app would be in the ~/Applications (current user apps) rather than /Applications (for all users)

Step 1 -
screen shot 2017-10-14 at 9 54 27 am

Step 2 -
Notice here, it directly jumps to step 3 of the installer and in doing so, "install for all users of this compuer" is selected by default and hence the installer prompts for an admin password. Opposite to the config I used during the build time.

screen shot 2017-10-14 at 9 54 35 am

Step 3 -
Then, I have to click on "change install location" which takes me to the step 2 of the installer.
Here on arrival, I get an error message "installer does not allow this software to be installed here" but the UI on the installer shows the "install for me only" is selected. But actually, the "install for all users of this compuer" and hence the error message.

screen shot 2017-10-14 at 9 54 49 am

Step 4 -
To get rid of the above error msg, I have to manually click "install only for me" option and then the installation succeeds without prompting for admin password and the app is installed to ~/Applications

screen shot 2017-10-14 at 9 54 59 am

@develar Can you please provide any inputs?

pkg link - https://www.dropbox.com/s/844rqyk64asb7pt/test.pkg?dl=0

P.S Thank you for the awesome work of electron-builder 馃憤

backlog investigate mac

Most helpful comment

We're running into this as well. @develar any idea how we can aim to solve it? Willing to help out.

All 6 comments

Last several weeks I was focused on delta updates, I will take a look on this issue in 2 days. macOS is our top priority (even not recommended pkg target).

I would be happy to use dmg but with dmg there is always a case - what if the user does not move the app to the applications folder.

With pkg I am assured that the app resides in applications folder after installation.

We're running into this as well. @develar any idea how we can aim to solve it? Willing to help out.

Hello everyone,
Do we have any idea to solve this problem?. That really a bit confusing for the user.

Seems to be an issue in the pkg installer, which is a Mac OS component. See also https://github.com/ContinuumIO/anaconda-issues/issues/836

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings