mirror of
https://github.com/janet-lang/janet
synced 2025-02-02 10:19:10 +00:00
Use paths in cache for jpm that will work on windows.
This commit is contained in:
parent
e8e4d637ef
commit
ea88ae1a5b
@ -296,10 +296,14 @@
|
|||||||
# Public utilities
|
# Public utilities
|
||||||
#
|
#
|
||||||
|
|
||||||
|
(def- filepath-replacer
|
||||||
|
"Convert url with potential bad characters into a file path element."
|
||||||
|
(peg/compile ~(% (+ (/ '(set "<>:\"/\\|?*") "_") '1))))
|
||||||
|
|
||||||
(defn repo-id
|
(defn repo-id
|
||||||
"Convert a repo url into a path component that serves as its id."
|
"Convert a repo url into a path component that serves as its id."
|
||||||
[repo]
|
[repo]
|
||||||
(string/replace-all "\\" "_" (string/replace-all "/" "_" repo)))
|
(get (peg/match filepath-replacer repo) 0))
|
||||||
|
|
||||||
(defn find-manifest-dir
|
(defn find-manifest-dir
|
||||||
"Get the path to the directory containing manifests for installed
|
"Get the path to the directory containing manifests for installed
|
||||||
|
Loading…
Reference in New Issue
Block a user