Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

windows character bug when running sbt #488

Open
er1c opened this issue Jul 3, 2020 · 3 comments
Open

windows character bug when running sbt #488

er1c opened this issue Jul 3, 2020 · 3 comments

Comments

@er1c
Copy link

er1c commented Jul 3, 2020

[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 sbt/sbt#4322

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

@er1c
Copy link
Author

er1c commented Jul 3, 2020

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

@er1c
Copy link
Author

er1c commented Jul 3, 2020

This is the likely culprit:

def fixPath: String = filename.replaceAll("/", File.separator)
, it looks like the author tried to do the right thing, but replaceAll uses regex instead of literally.

@artemkorsakov
Copy link

I have the same problem!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants