diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2019-05-22 11:31:23 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2019-05-22 11:31:23 -0400 |
commit | 2927892fbd98aff67adbd7f53b5339351187672e (patch) | |
tree | 06626fba8e0741c33057e4458f458603a479dde0 | |
parent | ea15b7981bd3511a692ab68f528087c6d7be6464 (diff) | |
download | dm-2927892fbd98aff67adbd7f53b5339351187672e.tar.gz |
getenv: split on null terminator instead of newline
-rw-r--r-- | source/conda.d | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/conda.d b/source/conda.d index 6ebb2bf..3ca5b62 100644 --- a/source/conda.d +++ b/source/conda.d @@ -13,7 +13,7 @@ import std.typecons; static auto getenv(string[string] base=null, string preface=null) { const char delim = '='; string[string] env; - string cmd = "env"; + string cmd = "env -0"; // Execute a command before dumping the environment if (preface !is null) { @@ -27,7 +27,7 @@ static auto getenv(string[string] base=null, string preface=null) { throw new Exception("Unable to read shell environment"); } - foreach (string line; splitLines(env_sh.output)) { + foreach (string line; split(env_sh.output, '\0')) { if (line.empty) { continue; } |