I'm trying to test this out on W10, and getting the following error after following the self install instructions on the stand-alone jar:
Enter installation directory [~/.saite]: ~/.saite
Exception in thread "main" java.lang.IllegalArgumentException: character to be escaped is missing
at java.util.regex.Matcher.appendReplacement(Matcher.java:809)
at java.util.regex.Matcher.replaceAll(Matcher.java:955)
at clojure.string$replace.invokeStatic(string.clj:106)
at clojure.string$replace.invoke(string.clj:75)
at aerial.fs$replace_re.invoke(fs.clj:18)
at aerial.fs$fullpath.invoke(fs.clj:40)
at aerial.aerosaite.core$get_install_dir.invokeStatic(core.clj:84)
at aerial.aerosaite.core$get_install_dir.invoke(core.clj:76)
at aerial.aerosaite.core$_main.invokeStatic(core.clj:197)
at aerial.aerosaite.core$_main.doInvoke(core.clj:179)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at aerial.aerosaite.core.main(Unknown Source)
I don't seem to have visibility on the aerial.aerosaite.core repo, so I can't see what -main is doing. It looks like maybe your filesystem utility support doesn't cover windows (that's my best guess based on the stack trace). Looking at the aerial.fs/fullpath
, the one that ships with the saite uberjar is different than the one on the public repo. I looked at the source from the REPL.
The original source uses regexes for matching different separators.
(defn fullpath
"Canonicalize FILESPEC, a string, to a fully qualified file path
for the native system. ~ in position one is translated to the
users home directory path, / and \\ are translated to the file
separator for the native system."
[filespec-str]
(let [^String s (str filespec-str)
s (replace-re
(case separator
"/" "\\"
"/") separator s)]
(cond
(= s "~") (System/getProperty "user.home")
(.startsWith s "~")
(str (System/getProperty "user.home")
(if (= (.charAt s 1) File/separatorChar) "" separator)
(subs s 1))
:else s)))
aerial.fs=> (fullpath "~/.saite/path/to/glory")
"C:\\Users\\joinr\\.saite\\path\\to\\glory"