-
Notifications
You must be signed in to change notification settings - Fork 86
Open
Description
I was trying out sbt-mdoc in a project where the -Wconf contains spaces. This resulted in warnings in for parsing -Wconf in the mdoc scala compilation.
Grepping the codebase I found code like:
mdoc/mdoc/src/main/scala/mdoc/internal/cli/Dependencies.scala
Lines 34 to 35 in e47e216
| case options => | |
| s"${settings.scalacOptions} ${options.map(_.value).mkString(" ")}" |
which I believe then gets resplit
| val options = removeDuplicatedOptions(scalacOptions.split("\\s+").filter(_.nonEmpty).toList) |
but if any option contains a whitespace character this will not correctly reconstruct the arguments.
I don't think it ever safe to assume options do not contain whitespace characters. So the code should be changed so that assumption is not made.
Reactions are currently unavailable