scala-cli icon indicating copy to clipboard operation
scala-cli copied to clipboard

${.} in directives does not work properly in Windows

Open jpabscale opened this issue 5 months ago • 0 comments

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.

jpabscale avatar Aug 18 '25 20:08 jpabscale