You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, thank you very much for the amazing tool you have made. I would like to know if is it possible to access the user's $PATH variable while running the postinstall script. I am trying to copy the $PATH into a plist file so that it has access to some installed commands, but after installation the copied $PATH is empty (or it does not contain same values as when I run $PATH in a terminal).
I checked the docs and I see some env variables available like INSTALL_PKG_SESSION_ID, but I could not find anything about $PATH. Is it available under some other name? If not, would it be possible to access it somehow? Thanks!
Edit: this is what gets pasted running echo $PATH >> file inside the script:
/bin:/sbin:/usr/bin:/usr/sbin:/usr/libexec
The text was updated successfully, but these errors were encountered:
It's not possible as far as I know as the script is run in an environment that is not the one of the current user (if the package does not request admin authentication) or the super user (if the package requires admin authentication).
For the record, it's strongly recommended to use absolute paths for commands run from a pre- or post- installations script.
First of all, thank you very much for the amazing tool you have made. I would like to know if is it possible to access the user's $PATH variable while running the postinstall script. I am trying to copy the $PATH into a plist file so that it has access to some installed commands, but after installation the copied $PATH is empty (or it does not contain same values as when I run $PATH in a terminal).
I checked the docs and I see some env variables available like
INSTALL_PKG_SESSION_ID
, but I could not find anything about $PATH. Is it available under some other name? If not, would it be possible to access it somehow? Thanks!Edit: this is what gets pasted running
echo $PATH >> file
inside the script:/bin:/sbin:/usr/bin:/usr/sbin:/usr/libexec
The text was updated successfully, but these errors were encountered: