load-env v0.2.1.0 Release Notes
-
- Don't override values already set in the environment
Given a hypothetical program
load-env
, which uses one of ourloadEnv
functions onstdin
:Previously,
FOO=bar load-env <<EOM FOO=bat EOM
would override
FOO
tobat
whenload-env
ran. But now, it will seeFOO
is alreadybar
and leave it.This is better behavior under the assumption that a
.env
file is meant to specify defaults in the case of nothing explicit. When there are explicit values in the environment, it's most likely that our user indeed wants them respected.