3 ms·
I agree with this. My question was about the blog posts assertion that something using environment variables to pass information was using a "ghost", but somet
by jakewins 4y ago
I agree with this.
My question was about the blog posts assertion that something using environment variables to pass information was using a "ghost", but something like a command line option isn't.
I guess, maybe the difference is in when and where the env var is specified. If you do something like
```
FOO=bar
<hundreds of lines of bash>
myapp # uses FOO
``
Then I think the blog post author has a point - there's "hidden" information in the environment/context that the callee expects and will use. If you copied just the `myapp` line and stuck it somewhere else, it would lose the implicit `FOO` it expects to have.
Vs something like
```
FOO=bar
<hundreds of lines of bash>
myapp --foo="${FOO}"
```
or
```
FOO=bar
<hundreds of lines of bash>
FOO="${FOO}" myapp # at least this way it's explicit!
```