Permalink
Browse files

issue #1 - use core/exit to return status

  • Loading branch information...
1 parent df861b8 commit 5d4d31ae928c8ef4f2c8c10c6c796974b8adc6dc @kumarshantanu committed Oct 16, 2011
Showing with 8 additions and 6 deletions.
  1. +8 −6 src/leiningen/sub.clj
View
@@ -1,5 +1,6 @@
(ns leiningen.sub
- (:use [leiningen.core :only [apply-task read-project task-not-found]]))
+ (:use [leiningen.core :only [apply-task exit read-project
+ task-not-found]]))
(defn run-sub-proj
@@ -18,8 +19,9 @@
:sub [\"modules/dep1\" \"modules/proj-common\"]
Note: Each sub-project directory should have its own project.clj file")
- (reduce (fn [a b]
- (let [a (if (= 0 a) nil a)
- b (if (= 0 b) nil b)]
- (or a b)))
- (map run-sub-proj (:sub project)))))
+ (when-let [code (reduce (fn [a b]
+ (let [a (if (= 0 a) nil a)
+ b (if (= 0 b) nil b)]
+ (or a b)))
+ (map run-sub-proj (:sub project)))]
+ (exit code))))

0 comments on commit 5d4d31a

Please sign in to comment.