Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Don't fail on empty version

  • Loading branch information...
commit a81ba03214e28af451cfa05dc7de8b291f75e5a4 1 parent bf1d780
@purcell purcell authored committed
Showing with 1 addition and 1 deletion.
  1. +1 −1  src/leiningen/update_repo.clj
View
2  src/leiningen/update_repo.clj
@@ -6,7 +6,7 @@
(def *lein-dir* (str (System/getProperty "user.home") "/.lein"))
(defn split-version [v]
- (if-let [[_ major minor patch suffix] (re-find #"(\d+)\.(\d+)(?:\.(\d+))?(?:-(.*))?" v)]
+ (if-let [[_ major minor patch suffix] (when v (re-find #"(\d+)\.(\d+)(?:\.(\d+))?(?:-(.*))?" v))]
[(Integer/parseInt major) (Integer/parseInt minor) (Integer/parseInt (or patch "0")) (or suffix "")]
[0 0 0 ""]))
Please sign in to comment.
Something went wrong with that request. Please try again.