Skip to content

Commit

Permalink
Shutdown agents on exit; fixes #94
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven Degutis committed Jun 13, 2014
1 parent 4368531 commit 5b24e8c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/clj/leiningen/spec.clj
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
(defn make-run-form [project speclj-args]
(let [exit-fn (if (or (:eval-in-leiningen project)
(= (:eval-in project) :leiningen))
`main/exit
`System/exit)]
'main/exit
'(fn [code]
(shutdown-agents)
(System/exit code)))]
`(let [failures# (speclj.cli/run ~@speclj-args)]
(~exit-fn (min 255 failures#)))))

Expand Down

0 comments on commit 5b24e8c

Please # to comment.