scala-cli
scala-cli copied to clipboard
${.} in directives does not work properly in Windows
Version(s) 1.8.2, 1.8.5
Describe the bug
${.} does not work properly in Windows (due to the different path segment separator \?).
To Reproduce
Put the following .sc file in any directory in Windows, and run it.
//> using javaProp "a.b.c=${.}"
val prop = System.getProperty("a.b.c")
println(prop)
println(prop.toCharArray.toSeq)
For example, if the file is located in C:\Temp, it prints
C:Temp
ArraySeq(C, :, T, e, m, p)
Expected behaviour
${.} should handle Windows path properly.