I am working on a Java project together with other developers, all using macOS. As a part of its functionality, the code in this project needs to edit local /etc/hosts
file which requires root user access. To accomplish that, we all run the IDE (IntelliJ) as root which creates a bunch of inconveniences.
I am really keen to find another solution to this problem. I had an idea to maybe somehow use a local environment variable (perhaps managed in IDE profile or something) but I am not sure how to do that.
Any ideas\suggestions how I can solve this problem?