Skip to content

Commit 172d6a0

Browse files
authored
Merge pull request #5587 from michelou/compiler-test
fix windows path (see #5560)
2 parents 3c89d53 + 35f3d55 commit 172d6a0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

compiler/test/dotty/tools/vulpix/RunnerOrchestration.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package tools
33
package vulpix
44

55
import java.io.{ File => JFile, InputStreamReader, BufferedReader, PrintStream }
6+
import java.nio.file.Paths;
67
import java.util.concurrent.atomic.AtomicBoolean
78
import java.util.concurrent.TimeoutException
89

@@ -157,9 +158,8 @@ trait RunnerOrchestration {
157158
*/
158159
private def createProcess: Process = {
159160
val sep = JFile.separator
160-
val cp =
161-
classOf[ChildJVMMain].getProtectionDomain.getCodeSource.getLocation.getFile + JFile.pathSeparator +
162-
Properties.scalaLibrary
161+
val url = classOf[ChildJVMMain].getProtectionDomain.getCodeSource.getLocation
162+
val cp = Paths.get(url.toURI).toString + JFile.pathSeparator + Properties.scalaLibrary
163163
val javaBin = sys.props("java.home") + sep + "bin" + sep + "java"
164164
new ProcessBuilder(javaBin, "-Xmx1g", "-cp", cp, "dotty.tools.vulpix.ChildJVMMain")
165165
.redirectErrorStream(true)

0 commit comments

Comments
 (0)