Why doesn't bash set PATH as an environment variable when setting its default value?
I checked the source code of bash, and the one that sets the default PATH should be variables.c:552:
The variable created by default is not an environment variable, see variables.c:2777:
And since there is no code modifying it afterwards, PATH ultimately does not become an environment variable.
Why not just set PATH as an environment variable?
Wouldn't that be better? Because some programs (like dpkg) need PATH to run properly.
评论
?
参与讨论