aboutsummaryrefslogtreecommitdiff
path: root/lux-lein
diff options
context:
space:
mode:
authorEduardo Julian2018-04-14 02:02:45 -0400
committerEduardo Julian2018-04-14 02:02:45 -0400
commit6687fcd6270213e3b36c1b6e59a9ac9c10c59bf2 (patch)
treed1eb12f21698e933dd0d7ab07c376727bcb06e13 /lux-lein
parent4ef2dbc49cd6dae1b8235dfd13dcd298c8aa3bfe (diff)
- Fixed a bug when packaging uber-JARs in lux-lein.
Diffstat (limited to '')
-rw-r--r--lux-lein/src/leiningen/lux/packager.clj9
1 files changed, 6 insertions, 3 deletions
diff --git a/lux-lein/src/leiningen/lux/packager.clj b/lux-lein/src/leiningen/lux/packager.clj
index 6fbc45d14..9bea3ef5c 100644
--- a/lux-lein/src/leiningen/lux/packager.clj
+++ b/lux-lein/src/leiningen/lux/packager.clj
@@ -109,9 +109,12 @@
(re-find pattern entry-name))]
(when matches?
(let [os (new ByteArrayOutputStream 1024)
- [_data _entry] (get @!all-jar-files entry-name [(byte-array 0) nil])
- _ (write os (fuse (read (new ByteArrayInputStream _data))
- (read (new ByteArrayInputStream entry-data))))]
+ no-data (byte-array 0)
+ [_data _entry] (get @!all-jar-files entry-name [no-data nil])
+ _ (if (= no-data _data)
+ (write os (read (new ByteArrayInputStream entry-data)))
+ (write os (fuse (read (new ByteArrayInputStream _data))
+ (read (new ByteArrayInputStream entry-data)))))]
(.toByteArray os)))))
(eval (get project :uberjar-merge-with)))
entry-data)]