Skip to content

Conversation

alex-free
Copy link

@alex-free alex-free commented Apr 30, 2025

When check_priv() re-executes the script with sudo using the arguments given to build-xenon-toolchain, it looses any custom set $PREFIX given to it originally. I.e., if you do PREFIX=/usr/local/custom build-xenon-toolchain toolchain, it will prompt for root privileges to be able to install into /usr/local/custom and then execute sudo build-xenon-toolchain toolchain automatically. This looses the given $PREFIX value and it will end up still installing to the default /usr/local/xenon because env vars are lost in in the sudo context. This specifies the $PREFIX variable during the sudo command as to not loose it and work as intended.

Edit: Also removed a redundant deletion of the priv_check file since it is known to not exist.

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

Successfully merging this pull request may close these issues.

1 participant