Skip to content

Commit

Permalink
Display a message before we update the search index
Browse files Browse the repository at this point in the history
Otherwise it looks as if `lein search` has locked up for minutes or is in
an infinite loop.
  • Loading branch information
michaelklishin committed Sep 21, 2012
1 parent 80fa726 commit 14ccb65
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/leiningen/search.clj
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@ Also accepts a second parameter for fetching successive pages."
(System/setProperty "java.io.tmpdir" (str new-tmp))
(doseq [context contexts]
(when (refresh? (.getRepositoryUrl context) project)
(update-index context)))
(do
(println "Updating the search index. This may take a few minutes...")
(update-index context))))
;; TODO: improve error message when page isn't numeric
(search-repository query contexts (Integer. page))
(finally
Expand Down

0 comments on commit 14ccb65

Please sign in to comment.