Skip to content

Commit

Permalink
Catch exceptions from missing search index downloads.
Browse files Browse the repository at this point in the history
  • Loading branch information
technomancy committed Jun 18, 2011
1 parent c1eba87 commit 1c7a5f0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
9 changes: 3 additions & 6 deletions src/leiningen/search.clj
Expand Up @@ -40,7 +40,7 @@
(try (when (download-needed? repository)
(download-index repository))
true
(catch java.io.FileNotFoundException _
(catch java.io.IOException _
false)))

;;; Searching
Expand Down Expand Up @@ -81,12 +81,9 @@
The first run will download a set of indices, which will take a
while. Pass in --update as the query to force a fresh download of all
indices. Also accepts a second parameter for fetching successive pages."
([query] (search {} query))
;; support running outside project
([project-or-query query-or-page]
(if (map? project-or-query)
(search project-or-query query-or-page 1)
(search {} project-or-query query-or-page)))
([query] (search {} query))
([project query] (search project query 1))
([project query page]
;; you know what would be just super? pattern matching.
(if (= "--update" query)
Expand Down
3 changes: 1 addition & 2 deletions todo.org
Expand Up @@ -39,12 +39,11 @@ See also https://github.com/technomancy/leiningen/issues
lein-clojars task doesn't support DSA keys
* For 1.6
- [ ] move exit-after-tests check to eval-in-project (discuss on list?)
- [ ] don't freak out when attempting to download non-existent indices
- [ ] look into using slim clojure to leave out src
- [ ] upgrade new task
- [ ] suppress useless ant output in classpath calculation for :local-repo-classpath
- [ ] Trampoline functionality
http://groups.google.com/group/leiningen/browse_thread/thread/a07a7f10edb77c9b
- [x] don't freak out when attempting to download non-existent indices
- [x] improve error message for unconfigured deploy
- [x] make search work outside project
- [x] clear up home directory duality in Windows/MinGW
Expand Down

0 comments on commit 1c7a5f0

Please sign in to comment.