I'm not sure I'd stick a path setting in .bashrc - just because it would make it very difficult to ever override that PATH setting elsewhere.
You might want that but it might also mess up some other program's attempt to set the PATH and then e.g. run a shell command.
I usually use .bash_profile or .profile more for this sort of thing and then I have to tell my terminal program to run bash as a login shell and that gives me what I mostly expect.
It seems to be for interactive shells. So I probably hit a problem while shelling out from my editor but potentially any IDE that has a command prompt will have trouble if it's trying to set environment variables.
Comments
.bashrc gets run every time a shell starts
I'm not sure I'd stick a path setting in .bashrc - just because it would make it very difficult to ever override that PATH setting elsewhere.
You might want that but it might also mess up some other program's attempt to set the PATH and then e.g. run a shell command.
I usually use .bash_profile or .profile more for this sort of thing and then I have to tell my terminal program to run bash as a login shell and that gives me what I mostly expect.
False things people believe.
https://stackoverflow.com/a/820533
https://unix.stackexchange.com/a/129144
https://www.gnu.org/software/bash/manual/bash.html
So e.g. when I get an interactive shell from vim, for example, or an IDE it will execute .bashrc which can blow away settings I want for building.
Probably because it's sourced from your distro provided /etc/profile. Bash will only source .bashrc on its own in some cases.
It seems to be for interactive shells. So I probably hit a problem while shelling out from my editor but potentially any IDE that has a command prompt will have trouble if it's trying to set environment variables.