Browse files

If output is a future, wait for it to finish.

If a user wants to use a callback and not wait for a program to finish, he can
use :background to run the whole thing in a future. In fact, :background might
go away in the future, seeing as how it is less characters to just wrap the
program call in a future manually.
  • Loading branch information...
Raynes committed Sep 30, 2012
1 parent 39f0815 commit 6021a9c4bd61c6c24be076c56078e1687d85ef79
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/conch/sh.clj
@@ -119,6 +119,8 @@
(conch/done proc))
(let [proc-out (redirect out options :out proc)
proc-err (redirect err options :err proc)]
+ (when (future? proc-out) @proc-out)
+ (when (future? proc-err) @proc-err)
verbose {:proc proc
:exit-code @exit-code

0 comments on commit 6021a9c

Please sign in to comment.