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 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