Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Use a cond instead of nested ifs.

  • Loading branch information...
commit e3f3e30f5594eaf8524fa03defb658a4b435e647 1 parent c941070
@Raynes authored
Showing with 7 additions and 8 deletions.
  1. +7 −8 src/conch/sh.clj
View
15 src/conch/sh.clj
@@ -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.
Something went wrong with that request. Please try again.