diff --git a/deps.bat b/deps.bat index 7db5c44..e7c9783 100644 --- a/deps.bat +++ b/deps.bat @@ -266,7 +266,7 @@ For more info, see: (let [f (io/file p executable)] (if (and (.isFile f) (.canExecute f)) - (.getCanonicalPath f) + (.getPath f) (recur (rest paths))))))))) (defn- home-dir [] @@ -288,7 +288,7 @@ For more info, see: (let [f (io/file java-home "bin" java-exe)] (if (and (.exists f) (.canExecute f)) - (.getCanonicalPath f) + (.getPath f) (throw (Exception. "Couldn't find 'java'. Please set JAVA_HOME.")))) (throw (Exception. "Couldn't find 'java'. Please set JAVA_HOME.")))) java-cmd)))) @@ -525,7 +525,7 @@ public class ClojureToolsDownloader { java-cmd [(get-java-cmd) "-XX:-OmitStackTraceInFastThrow"] success?* (atom true)] (binding [*exit-fn* (fn [{:keys [exit message]}] - (when-not (= exit 0) + (when-not (= 0 exit) (warn message) (reset! success?* false)))] (*aux-process-fn* {:cmd (vec (concat java-cmd @@ -594,7 +594,7 @@ public class ClojureToolsDownloader { (*exit-fn* {:exit ct-error-exit-code :message (str "Error: Cannot download Clojure tools." " Please download manually from " ct-url-str - " to " (str (io/file dir ct-zip-name)))}) + " to " (io/file dir ct-zip-name))}) ::passthrough)] (when (and sha256-url-str (not *clojure-tools-download-fn*) (not (.exists sha256-file)) (not= ::passthrough res)) (*exit-fn* {:exit ct-error-exit-code @@ -614,7 +614,7 @@ public class ClojureToolsDownloader { :message (str "Error: sha256 of zip and expected sha256 do not match: " hash " vs. " sha "\n" " Please download manually from " ct-url-str - " to " (str (io/file dir ct-zip-name)))}) + " to " (io/file dir ct-zip-name))}) (.delete sha256-file)))) (warn "Unzipping" (str zip-file) "...") (unzip zip-file (.getPath dir)) @@ -1129,7 +1129,7 @@ public class ClojureToolsDownloader { main-cache-opts (when (.exists (io/file main-file)) (-> main-file slurp str/split-lines)) main-cache-opts (str/join " " main-cache-opts) - command (str/replace command "{{main-opts}}" (str main-cache-opts)) + command (str/replace command "{{main-opts}}" main-cache-opts) command (str/split command #"\s+") command (into command (:args cli-opts))] (*clojure-process-fn* {:cmd command})) diff --git a/deps.clj b/deps.clj index f352a34..76f552a 100755 --- a/deps.clj +++ b/deps.clj @@ -261,7 +261,7 @@ For more info, see: (let [f (io/file p executable)] (if (and (.isFile f) (.canExecute f)) - (.getCanonicalPath f) + (.getPath f) (recur (rest paths))))))))) (defn- home-dir [] @@ -283,7 +283,7 @@ For more info, see: (let [f (io/file java-home "bin" java-exe)] (if (and (.exists f) (.canExecute f)) - (.getCanonicalPath f) + (.getPath f) (throw (Exception. "Couldn't find 'java'. Please set JAVA_HOME.")))) (throw (Exception. "Couldn't find 'java'. Please set JAVA_HOME.")))) java-cmd)))) @@ -520,7 +520,7 @@ public class ClojureToolsDownloader { java-cmd [(get-java-cmd) "-XX:-OmitStackTraceInFastThrow"] success?* (atom true)] (binding [*exit-fn* (fn [{:keys [exit message]}] - (when-not (= exit 0) + (when-not (= 0 exit) (warn message) (reset! success?* false)))] (*aux-process-fn* {:cmd (vec (concat java-cmd @@ -589,7 +589,7 @@ public class ClojureToolsDownloader { (*exit-fn* {:exit ct-error-exit-code :message (str "Error: Cannot download Clojure tools." " Please download manually from " ct-url-str - " to " (str (io/file dir ct-zip-name)))}) + " to " (io/file dir ct-zip-name))}) ::passthrough)] (when (and sha256-url-str (not *clojure-tools-download-fn*) (not (.exists sha256-file)) (not= ::passthrough res)) (*exit-fn* {:exit ct-error-exit-code @@ -609,7 +609,7 @@ public class ClojureToolsDownloader { :message (str "Error: sha256 of zip and expected sha256 do not match: " hash " vs. " sha "\n" " Please download manually from " ct-url-str - " to " (str (io/file dir ct-zip-name)))}) + " to " (io/file dir ct-zip-name))}) (.delete sha256-file)))) (warn "Unzipping" (str zip-file) "...") (unzip zip-file (.getPath dir)) @@ -1124,7 +1124,7 @@ public class ClojureToolsDownloader { main-cache-opts (when (.exists (io/file main-file)) (-> main-file slurp str/split-lines)) main-cache-opts (str/join " " main-cache-opts) - command (str/replace command "{{main-opts}}" (str main-cache-opts)) + command (str/replace command "{{main-opts}}" main-cache-opts) command (str/split command #"\s+") command (into command (:args cli-opts))] (*clojure-process-fn* {:cmd command}))