sbt-microsites icon indicating copy to clipboard operation
sbt-microsites copied to clipboard

windows character bug when running sbt

Open er1c opened this issue 4 years ago • 3 comments

[debug]         C:\Users\eric\Documents\GitHub\scala-typesafeequals\core\src\main\scala\typesafeequals\package.scala
[info] Main Scala API documentation successful.
[debug] Checking for meta build source updates
[error] java.lang.IllegalArgumentException: character to be escaped is missing
[error]         at java.base/java.util.regex.Matcher.appendExpandedReplacement(Matcher.java:1020)
[error]         at java.base/java.util.regex.Matcher.appendReplacement(Matcher.java:998)
[error]         at java.base/java.util.regex.Matcher.replaceAll(Matcher.java:1182)

It happens when running sbt ci-doc on https://github.com/er1c/scala-typesafeequals, works fine on linux. This might be related to https://github.com/sbt/sbt/issues/4322

Full stacktrace: https://gist.github.com/er1c/3b363110bcd69a6b5e1603f7179bba68

er1c avatar Jul 03 '20 00:07 er1c

Looks like I still get the same exception even with set JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8 and chcp 65001

er1c avatar Jul 03 '20 00:07 er1c

This is the likely culprit: https://github.com/47degrees/sbt-microsites/blob/4ba2591e51d5752c6de393bca170bfacb9670842/src/main/scala/microsites/ioops/ioops.scala#L56, it looks like the author tried to do the right thing, but replaceAll uses regex instead of literally.

er1c avatar Jul 03 '20 00:07 er1c

I have the same problem!

artemkorsakov avatar Oct 01 '20 11:10 artemkorsakov