Skip to content

Commit

Permalink
fix: cp handling for root package aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
armed committed May 21, 2024
1 parent 96a09d2 commit 4d9057c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
4 changes: 3 additions & 1 deletion src/k16/kmono/config.clj
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@
(defn- create-config
[repo-root glob]
(let [package-dirs (conj (fs/glob repo-root glob)
(fs/absolutize (fs/path repo-root)))]
(-> (fs/path repo-root)
(fs/normalize)
(fs/absolutize)))]
{:packages (->> package-dirs
(map (partial create-package-config repo-root glob))
(remove nil?)
Expand Down
11 changes: 8 additions & 3 deletions src/k16/kmono/repl/deps.clj
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
{:root root
:package-dir package-dir
:path path})
(fs/relativize root (fs/path package-dir path)))
(if (fs/same-file? root package-dir)
(fs/path package-dir path)
(fs/relativize root (fs/path package-dir path))))

(defn- strip-extra-parent
"JRE 8 workaround"
Expand Down Expand Up @@ -100,8 +102,11 @@
(let [package-dirs (->> config
:packages
(map (fn [pkg]
[(fs/file-name (fs/path (:dir pkg)))
(:dir pkg)]))
[(fs/file-name (fs/normalize
(fs/path (:dir pkg))))
(-> (:dir pkg)
(fs/normalize)
(str))]))
(into {}))
package-deps (all-packages-deps-alias (:packages config))
package-alias-pairs' (expand-package-alias-pairs
Expand Down

0 comments on commit 4d9057c

Please sign in to comment.