diff options
author | Phil Booth <pmbooth@gmail.com> | 2018-09-26 06:49:21 +0100 |
---|---|---|
committer | Phil Booth <pmbooth@gmail.com> | 2018-09-26 07:02:39 +0100 |
commit | a1cd868c0224f16d921a25f04cbc39cb03a5471d (patch) | |
tree | 41159d19af67c8bacc1917b0ddac193a8e6bf416 /src | |
parent | 4475925dc2136ae139245164cbb77d59b3d84dae (diff) |
Treat empty environment variables as unset
Diffstat (limited to 'src')
-rw-r--r-- | src/env.rs | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -74,6 +74,11 @@ impl Source for Environment { }; for (key, value) in env::vars() { + // Treat empty environment variables as unset + if cfg!(feature = "ignore-empty-env-vars") && value == "" { + continue; + } + let mut key = key.to_string(); // Check for prefix |