diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2019-05-22 21:48:06 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2019-05-22 21:48:06 -0400 |
commit | 90845a5fa5e8ba65de1b158aa392cbed01f3c7f9 (patch) | |
tree | 54b65b598a9c2ddf997a225dce5734433406e4ea /source | |
parent | 0025324fa203929ee641e6a4238fd8e13b396cb7 (diff) | |
download | dm-90845a5fa5e8ba65de1b158aa392cbed01f3c7f9.tar.gz |
Back to blocking IO. Thanks Jenkins.
Diffstat (limited to 'source')
-rw-r--r-- | source/conda.d | 27 |
1 files changed, 6 insertions, 21 deletions
diff --git a/source/conda.d b/source/conda.d index 7df7cd2..1bd6581 100644 --- a/source/conda.d +++ b/source/conda.d @@ -32,14 +32,8 @@ static auto getenv(string[string] base=null, string preface=null) { } auto env_sh = executeShell(cmd, env=base); - scope(exit) { - stdout.flush(); - stderr.flush(); - } - if (env_sh.status) { - writeln(env_sh.status, env_sh.output); - throw new Exception("Unable to read shell environment"); + throw new Exception("Unable to read shell environment:" ~ env_sh.output); } foreach (string line; split(env_sh.output, delim_line)) { @@ -199,6 +193,7 @@ class Conda { fp.write("always_yes: True\n"); fp.write("quiet: True\n"); fp.write("auto_update_conda: False\n"); + fp.write("notify_outdated_conda: False\n"); fp.write("rollback_enabled: False\n"); fp.write("channels:\n"); if (this.channels.empty) { @@ -235,8 +230,7 @@ class Conda { } int run(string command) { - string cmd = "conda " ~ command; - auto proc = this.sh(cmd); + auto proc = this.sh("conda " ~ command); return proc; } @@ -247,22 +241,13 @@ class Conda { int sh(string command) { writeln("Running: " ~ command); - auto proc = spawnShell(command, env=this.env); - int st = 0; - scope (exit) { - st = wait(proc); - stdout.flush(); - stderr.flush(); - } - return st; + auto proc = executeShell(command, env=this.env); + writeln(proc.output); + return proc.status; } auto sh_block(string command) { auto proc = executeShell(command, env=this.env); - scope(exit) { - stdout.flush(); - stderr.flush(); - } return proc; } |