Hey all, trying to run clay (natively) on windows I'm getting the following error:
(clay/make! {:source-path "src/mini/playground.clj" :base-target-path "test"})
; Execution error (URISyntaxException) at java.net.URI$Parser/fail (URI.java:2974).
; Illegal character in path at index 4: test\src.mini.playground_files/html-default0.js
^
The culprit is the \ indicated. Digging into it, it looks like hiccup takes this string (full-target-path and tries to turn it into a URI using Java.net.URI, which doesn't support windows style file paths (it wants the input to be a proper URI). (see hiccup.util/to-uri)
The string was created in scicloj.clay.v2.make/spec->full-target-path using babashka.fs/path. I was able to make it work by passing the path through fs/unixify, but it seems hacky, and is likely missing the same issue with other uses of fs/path.
--- a/src/scicloj/clay/v2/make.clj
+++ b/src/scicloj/clay/v2/make.clj
@@ -101,7 +101,7 @@
(and "-revealjs"))
".html"))
flatten-targets (str/replace #"[\\/]+" ".")
- true (#(fs/path base-target-path %))))))
+ true (#(fs/unixify (fs/path base-target-path %)))))))
:else
Hey all, trying to run clay (natively) on windows I'm getting the following error:
The culprit is the
\indicated. Digging into it, it looks like hiccup takes this string (full-target-pathand tries to turn it into a URI using Java.net.URI, which doesn't support windows style file paths (it wants the input to be a proper URI). (seehiccup.util/to-uri)The string was created in
scicloj.clay.v2.make/spec->full-target-pathusingbabashka.fs/path. I was able to make it work by passing the path through fs/unixify, but it seems hacky, and is likely missing the same issue with other uses of fs/path.