Skip to content

Commit

Permalink
Fixes issue #555
Browse files Browse the repository at this point in the history
This modifies the file-filter function so that if the criteria seq is
empty, it throws an error.
  • Loading branch information
Daniel Manila committed Jun 17, 2017
1 parent 743eb05 commit f9213f1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- `set-env!` works even if the user has set `*print-level*` or `*print-length*` to non-nil in their `$BOOT_HOME/profile.boot`. [#587][587] [#586][586]
- `tmpfile` "Commit: adding..." messages now only appear with `-vv` which eases debugging tasks with `-v` [#557][557]
- Pod tests pass and can be run with `make` [#567][567]
- `file-filter` (called by all `by-*` functions) throws an error if no criteria are specified.

#### Fixed

Expand Down
1 change: 1 addition & 0 deletions boot/core/src/boot/core.clj
Original file line number Diff line number Diff line change
Expand Up @@ -1218,6 +1218,7 @@
"A file filtering function factory. FIXME: more documenting here."
[mkpred]
(fn [criteria files & [negate?]]
(assert (seq criteria) "boot.core/file-filter requires a list of criteria but null was passed in, make sure your `by-*` calls are passing them.")
(let [tmp? (partial satisfies? tmpd/ITmpFile)
->file #(if (tmp? %) (io/file (tmp-path %)) (io/file %))
pred (apply juxt (mapv mkpred criteria))]
Expand Down

0 comments on commit f9213f1

Please sign in to comment.