diff --git a/CHANGELOG.md b/CHANGELOG.md index 2eb348e..16d5507 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,10 @@ DEPS_CLJ_TOOLS_VERSION=1.11.1.1165 bb clojure [deps.clj](https://github.com/borkdude/deps.clj): a faithful port of the clojure CLI bash script to Clojure +## Unreleased + +- [#114](https://github.com/borkdude/deps.clj/issues/114): Align with original scripts on how to determine home directory + ## 1.11.1.1413 - Catch up with CLI `1.11.1.1413` diff --git a/deps.bat b/deps.bat index d6358ef..e8a9a5c 100644 --- a/deps.bat +++ b/deps.bat @@ -269,9 +269,9 @@ For more info, see: (defn- home-dir [] (if windows? - ;; workaround for https://github.com/oracle/graal/issues/1630 - (*getenv-fn* "userprofile") - (System/getProperty "user.home"))) + (or (*getenv-fn* "home") + (*getenv-fn* "userprofile")) + (*getenv-fn* "home"))) (def ^:private java-exe (if windows? "java.exe" "java")) diff --git a/deps.clj b/deps.clj index 5801eed..8636c28 100755 --- a/deps.clj +++ b/deps.clj @@ -264,9 +264,9 @@ For more info, see: (defn- home-dir [] (if windows? - ;; workaround for https://github.com/oracle/graal/issues/1630 - (*getenv-fn* "userprofile") - (System/getProperty "user.home"))) + (or (*getenv-fn* "home") + (*getenv-fn* "userprofile")) + (*getenv-fn* "home"))) (def ^:private java-exe (if windows? "java.exe" "java")) diff --git a/src/borkdude/deps.clj b/src/borkdude/deps.clj index 8164fb0..71036a5 100755 --- a/src/borkdude/deps.clj +++ b/src/borkdude/deps.clj @@ -261,9 +261,9 @@ For more info, see: (defn- home-dir [] (if windows? - ;; workaround for https://github.com/oracle/graal/issues/1630 - (*getenv-fn* "userprofile") - (System/getProperty "user.home"))) + (or (*getenv-fn* "home") + (*getenv-fn* "userprofile")) + (*getenv-fn* "home"))) (def ^:private java-exe (if windows? "java.exe" "java"))