Permalink
Browse files

Use a cond instead of nested ifs.

  • Loading branch information...
1 parent c941070 commit e3f3e30f5594eaf8524fa03defb658a4b435e647 @Raynes committed Sep 25, 2012
Showing with 7 additions and 8 deletions.
  1. +7 −8 src/conch/sh.clj
View
@@ -56,14 +56,13 @@
:timeout)
(let [proc-out (when-not out (output proc :out options))
proc-err (when-not err (output proc :err options))]
- (if verbose
- {:proc proc
- :exit-code exit-code
- :stdout proc-out
- :stderr proc-err}
- (if (= (:seq options) :err)
- proc-err
- proc-out)))))))
+ (cond
+ verbose {:proc proc
+ :exit-code exit-code
+ :stdout proc-out
+ :stderr proc-err}
+ (= (:seq options) :err) proc-err
+ :else proc-out))))))
(defn execute [name & args]
(let [end (last args)

0 comments on commit e3f3e30

Please sign in to comment.