clarified env;
authorwenzelm
Sun, 13 Mar 2016 12:44:24 +0100
changeset 62612 cf48f41a9278
parent 62611 dc7cc407c911
child 62613 7c723aa87871
clarified env;
src/Pure/System/isabelle_system.scala
--- a/src/Pure/System/isabelle_system.scala	Sun Mar 13 12:39:12 2016 +0100
+++ b/src/Pure/System/isabelle_system.scala	Sun Mar 13 12:44:24 2016 +0100
@@ -182,15 +182,10 @@
     env: Map[String, String] = settings(),
     redirect: Boolean = false): Process =
   {
-    val cmdline = new java.util.LinkedList[String]
-    for (s <- command_line) cmdline.add(s)
-
-    val proc = new ProcessBuilder(cmdline)
+    val proc = new ProcessBuilder
+    proc.command(command_line:_*)  // fragile on Windows
     if (cwd != null) proc.directory(cwd)
-    if (env != null) {
-      proc.environment.clear
-      for ((x, y) <- env) proc.environment.put(x, y)
-    }
+    proc.environment.clear; for ((x, y) <- env) proc.environment.put(x, y)
     proc.redirectErrorStream(redirect)
     proc.start
   }