1
0
Fork 0
dotfiles/base/base.clj

5 lines
178 B
Clojure

;;executes shell command but throws exception on error
(defn- safe-sh [& commands]
(as-> (apply shell/sh commands) $
(if (= (:exit $) 0) $ (throw (Exception. (:err $))))))