Skip to content

Commit

Permalink
Correct path separator for windows machines
Browse files Browse the repository at this point in the history
  • Loading branch information
Kwestor committed Feb 2, 2015
1 parent d5c07fa commit 2864d13
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -21,7 +21,7 @@ object ScoverageCompiler {
s.Xprint.value = List("all")
s.Yrangepos.value = true
s.Yposdebug.value = true
s.classpath.value = classPath.mkString(":")
s.classpath.value = classPath.mkString(File.pathSeparator)
s
}

Expand Down Expand Up @@ -66,7 +66,7 @@ class ScoverageCompiler(settings: scala.tools.nsc.Settings, reporter: scala.tool
extends scala.tools.nsc.Global(settings, reporter) {

def addToClassPath(groupId: String, artifactId: String, version: String): Unit = {
settings.classpath.value = settings.classpath.value + ":" + ScoverageCompiler
settings.classpath.value = settings.classpath.value + File.pathSeparator + ScoverageCompiler
.findIvyJar(groupId, artifactId, version)
.getAbsolutePath
}
Expand Down

2 comments on commit 2864d13

@sksamuel
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't that going to fail on unix now?

@Kwestor
Copy link
Owner Author

@Kwestor Kwestor commented on 2864d13 Feb 2, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to JavaDoc, no:

The system-dependent path-separator character. This field is initialized to contain the first character of the value of the system property path.separator. This character is used to separate filenames in a sequence of files given as a path list. On UNIX systems, this character is ':'; on Microsoft Windows systems it is ';'.

It's the same story with File.separator which defaults to either \ or / depending on operating system.

Please sign in to comment.