pkgbuild to create an Apple installer
preinstall script, I have the following, which opens in Chrome if I invoke it myself, however when run by
pkgbuild script, always opens the above link using Safari:
I tried to force it to run as the current user:
sudo -u "$(logname || echo "$SUDO_USER")" open "https://apple.stackexchange.com/"
... but it still uses Safari.
My system default is currently Chrome. I changed it to Firefox, and the same thing occurs.
How do I open this URL using the default browser within a