Including userscript in IA package will not work
kbotnen opened this issue · 1 comments
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
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.