src/Pure/System/standard_system.scala
changeset 34219 d37cfca69887
parent 34202 99241daf807d
child 34258 e936d3c35ce0
     1.1 --- a/src/Pure/System/standard_system.scala	Sat Jan 02 00:08:47 2010 +0100
     1.2 +++ b/src/Pure/System/standard_system.scala	Sat Jan 02 01:14:49 2010 +0100
     1.3 @@ -101,12 +101,13 @@
     1.4  
     1.5    /* shell processes */
     1.6  
     1.7 -  def raw_execute(env: Map[String, String], redirect: Boolean, args: String*): Process =
     1.8 +  def raw_execute(cwd: File, env: Map[String, String], redirect: Boolean, args: String*): Process =
     1.9    {
    1.10      val cmdline = new java.util.LinkedList[String]
    1.11      for (s <- args) cmdline.add(s)
    1.12  
    1.13      val proc = new ProcessBuilder(cmdline)
    1.14 +    if (cwd != null) proc.directory(cwd)
    1.15      if (env != null) {
    1.16        proc.environment.clear
    1.17        for ((x, y) <- env) proc.environment.put(x, y)