Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Including userscript in IA package will not work #85

Open
kbotnen opened this issue Jan 11, 2021 · 1 comment
Open

Including userscript in IA package will not work #85

kbotnen opened this issue Jan 11, 2021 · 1 comment

Comments

@kbotnen
Copy link

kbotnen commented Jan 11, 2021

Hi,

Not sure if it should be a priority to do anything with this, or just add as a NB to the documentation.

This will not work, scenario 1:

    {
      "file": "/Library/installapplications/userscripts/depnotify_user_launcher.py",
      "hash": "sha256_hash_goes_here",
      "name": "DEPNotify User Launcher",
      "type": "userscript"
    }

This will work, scenario 2:

  {
      "file": "/Library/installapplications/userscripts/depnotify_user_launcher.py",
      "hash": "sha256_hash_goes_here",
      "name": "DEPNotify User Launcher",
      "type": "userscript",
      "url": "https://raw.githubusercontent.com/erikng/installapplicationsdemo/master/installapplications/scripts/user/depnotify_user_launcher.py"
    }

The difference is that in scenario 1, everything is included in the InstallApplication.pkg, in scenario 2, it is downloaded from the Internet.

In scenario 1, the userscripts folder does exist at the time installapplications.py is checking for existance of needed folders (lines: 474-479), which will bypass the creation of the folder /var/tmp/installapplications (which again is needed for /var/tmp/installapplications/.userscript).

K

@erikng
Copy link
Member

erikng commented Jan 11, 2021

Interesting find. When I first wrote this tool, I honestly did not envision it having everything bundled - that kind of goes against what most people experience as they debug and iterate.

It running bundled was a happy accident. I'm happy to merge a PR that addresses this, but it's a very low priority for me to write and test a solution here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants