From 7a43e38bf34e8b5d6f580520bd906053221ac18f Mon Sep 17 00:00:00 2001 From: Geoff Shannon Date: Sat, 26 Oct 2019 22:57:25 -0700 Subject: [PATCH 1/2] Make the watch task exit when there are no directories to watch --- boot/tasks/src/boot/task/built_in.clj | 1 + 1 file changed, 1 insertion(+) diff --git a/boot/tasks/src/boot/task/built_in.clj b/boot/tasks/src/boot/task/built_in.clj index 26ce6e1f..9d7aa201 100644 --- a/boot/tasks/src/boot/task/built_in.clj +++ b/boot/tasks/src/boot/task/built_in.clj @@ -367,6 +367,7 @@ srcdirs (->> (map (comp :dir val) (core/get-checkouts)) (into (core/user-dirs fileset)) (map (memfn getPath))) + _ (when-not (seq srcdirs) (throw (Exception. "No directories to watch."))) watcher (apply file/watcher! :time srcdirs) incl-excl (if-not (or (seq include) (seq exclude)) identity From c4f643b1a575da4ee35d0942a1e6aa6ab38835b6 Mon Sep 17 00:00:00 2001 From: Geoff Shannon Date: Sat, 26 Oct 2019 23:02:54 -0700 Subject: [PATCH 2/2] Add changes section for Unreleased and document watch task fix --- CHANGES.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index f512eb56..686f6e2d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,11 @@ # Changes +## Unreleased + +#### Fixed + +- Fix `watch` task hanging when run with no directories to watch + ## 2.8.2 #### Fixed