Skip to content
Browse files

only open local-jar if it exists

  • Loading branch information...
1 parent fc7bf48 commit c3cae3d65e41ce34b1a483f6c74badb165509cd0 @klang committed Jan 10, 2013
Showing with 3 additions and 2 deletions.
  1. +3 −2 nrepl.el
View
5 nrepl.el
@@ -337,8 +337,9 @@ Uses `find-file'."
(cond
((file-exists-p jar) jar)
((string-match "^.+\\(\\/.m2.+\\)" jar)
- (concat (getenv "HOME") (match-string 1 jar)))
- (:else jar)))
+ (let ((local-jar (concat (getenv "HOME") (match-string 1 jar))))
+ (if (file-exists-p local-jar) local-jar jar)))
+ (t jar)))
(defun nrepl-find-resource (resource)
(cond ((string-match "^file:\\(.+\\)" resource)

0 comments on commit c3cae3d

Please sign in to comment.
Something went wrong with that request. Please try again.