Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Not at all. The source command is basically just an include, executing shell commands in the current scope.

I'm talking about inheriting the environmental state of any subprocess. You can't source a binary.



Can you tell me an example where this has a difference in behaviour?

Basically somewhere that source would not behave as you wanted?

I'm also uncertain what you mean wrt a binary. A binary will only have the environment variables available to the shell it's executed in - or do you mean that you'd also want it to inherit variables the binary itself might read from disk via .env files or similar?




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: