From 095eb8148885dc6f1cdfe89293590f92add29f07 Mon Sep 17 00:00:00 2001 From: anatoly Date: Thu, 6 Apr 2017 17:35:35 -0400 Subject: [PATCH] #81: stop-except & start-without to take all states --- src/mount/core.cljc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/mount/core.cljc b/src/mount/core.cljc index e5e91c1..db3e660 100644 --- a/src/mount/core.cljc +++ b/src/mount/core.cljc @@ -358,7 +358,9 @@ (let [all (set (find-all-states)) states (map var-to-str states) states (remove (set states) all)] - (apply stop states))) + (if-not (empty? states) + (apply stop states) + {:stopped #{}}))) (defn start-with-args [xs & states] (reset! -args xs) @@ -383,5 +385,7 @@ (let [app (set (all-without-subs)) states (map var-to-str states) without (remove (set states) app)] - (apply start without)) + (if-not (empty? without) + (apply start without) + {:started #{}})) (start)))