3 ms·
To give an illustration of how bad this can get: At a past firm, I was trying to debug how a particular ENV var was getting set. I started out thinking it was
by alexpotato 1y ago
To give an illustration of how bad this can get:
At a past firm, I was trying to debug how a particular ENV var was getting set. I started out thinking it was something simple like the user's .bashrc or equivalent.
I quickly realized that there were roughly 10 "layers" of env var loadings happening where the first couple layers were:
- firm wide
- region
- business unit
- department
- team etc etc
I ended up having to turn on a bash debug flag so that I could see exactly where the var was getting set in the layer stack.
- jakub_g 1y agoNot sure if any other high level languages have it, but Node.js has just added command line flags to trace precisely all env var accesses and modifications: https://nodejs.org/api/cli.html#--trace-env https://nodejs.org/api/cli.html#--trace-env Since you can set/unset/modify env vars in so many ways with different APIs, this sounds super useful in complex debugging scenarios.
- esafak 1y ago"One namespace ought to be enough for anybody".