Is there a way that I can execute a command that I...
# general
Is there a way that I can execute a command that I run with
./pants run
without pants switching to the root user cache?
first of all: sounds like a bad idea to do this.
i would probably create a group/role with the specific rights necessary
i guess it highly depends on what you're trying to do
You can re-set the paths to the caches back to those under the non-su's homedir with these options (via cmd-line flag or env var, or supplemental config file): ā€¢ ā€¢
šŸ™‚ 1
I think the
script also uses the homedir for something, you might have to tweak that as well
But keep in mind that Pants will write files as the root user, and this may mess with any future runs as the non-root user
This overall seems like it will be trouble
šŸ’Æ 1
not only for build artifacts and executables. You got pants (service) running as a root then.
Thanks guys for the suggestions and infos. You're absolutely right about not doing that. I'll look into how I can restructure the process there to not require sudo at that place.
šŸ‘ 1
I don't think this is something, you would want to do, ever. I'm even splitting building and installing software with Make. It does mess with git repositories from time to time as well
Regardless of which build system you are using