Skip to content

Commit e6b3abd

Browse files
committed
Check if evaluator runs on Windows
1 parent ce04cc8 commit e6b3abd

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

language-server/src/dotty/tools/languageserver/worksheet/Evaluator.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@ import org.eclipse.lsp4j.jsonrpc.CancelChecker
99
private object Evaluator {
1010

1111
private val javaExec: Option[String] = {
12-
val isWindows = sys.props("os.name").toLowerCase().indexOf("win") >= 0
1312
val bin = new File(sys.props("java.home"), "bin")
14-
val java = new File(bin, if (isWindows) "java.exe" else "java")
13+
val java = new File(bin, if (scala.util.Properties.isWin) "java.exe" else "java")
1514

1615
if (java.exists()) Some(java.getAbsolutePath())
1716
else None

0 commit comments

Comments
 (0)