From 8b158ecbd330dce3603ba5e854fb21ca482c0b64 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Wed, 11 Jan 2017 21:39:30 -0400 Subject: - Fixed some bugs in the REPL. --- lux-lein/src/leiningen/lux/utils.clj | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'lux-lein/src') diff --git a/lux-lein/src/leiningen/lux/utils.clj b/lux-lein/src/leiningen/lux/utils.clj index 40eb5bad8..17315f39c 100644 --- a/lux-lein/src/leiningen/lux/utils.clj +++ b/lux-lein/src/leiningen/lux/utils.clj @@ -39,7 +39,7 @@ nil)) jar-paths)) stdlib-path (prepare-path (some (fn [^:private path] - (if (.contains path "com/github/luxlang/lux-stdlib") + (if (.contains path "com/github/luxlang/stdlib") path nil)) jar-paths)) @@ -70,7 +70,8 @@ " " output-dir)))) (defn repl-path [project source-paths] - (let [jar-paths (->> ^java.net.URLClassLoader (ClassLoader/getSystemClassLoader) + (let [output-dir (get-in project [:lux :target] output-dir) + jar-paths (->> ^java.net.URLClassLoader (ClassLoader/getSystemClassLoader) (.getURLs) (map #(.getFile ^java.net.URL %)) (filter #(.endsWith ^String % ".jar"))) @@ -80,7 +81,7 @@ nil)) jar-paths)) stdlib-path (prepare-path (some (fn [^:private path] - (if (.contains path "com/github/luxlang/lux-stdlib") + (if (.contains path "com/github/luxlang/stdlib") path nil)) jar-paths)) @@ -99,7 +100,10 @@ java-cmd (get project :java-cmd "java") jvm-opts (->> (get project :jvm-opts) (interpose " ") (reduce str ""))] (str java-cmd " " jvm-opts " " vm-options " -cp " (str compiler-path java.io.File/pathSeparator class-path) - " lux repl " (->> source-paths (interpose unit-separator) (apply str)))))) + " lux repl " + (->> (get project :resource-paths (list)) (interpose unit-separator) (apply str)) + " " (->> source-paths (interpose unit-separator) (apply str)) + " " output-dir)))) (defn run-process [command working-directory pre post] (let [process (.exec (Runtime/getRuntime) command nil working-directory)] -- cgit v1.2.3