diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2019-05-22 20:09:52 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2019-05-22 20:09:52 -0400 |
commit | 0025324fa203929ee641e6a4238fd8e13b396cb7 (patch) | |
tree | 657be67febb4d23e3af98a33c5724913f4d20532 /source/conda.d | |
parent | c2aab5070b5a98f144645b3484d7b92ad3ae3278 (diff) | |
download | dm-0025324fa203929ee641e6a4238fd8e13b396cb7.tar.gz |
Flush buffers
Diffstat (limited to 'source/conda.d')
-rw-r--r-- | source/conda.d | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/source/conda.d b/source/conda.d index f4de704..7df7cd2 100644 --- a/source/conda.d +++ b/source/conda.d @@ -32,6 +32,10 @@ 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); @@ -244,11 +248,21 @@ class Conda { int sh(string command) { writeln("Running: " ~ command); auto proc = spawnShell(command, env=this.env); - return wait(proc); + int st = 0; + scope (exit) { + st = wait(proc); + stdout.flush(); + stderr.flush(); + } + return st; } auto sh_block(string command) { auto proc = executeShell(command, env=this.env); + scope(exit) { + stdout.flush(); + stderr.flush(); + } return proc; } |