src/Pure/System/standard_system.scala
changeset 34202 99241daf807d
parent 34201 c95dcd12f48a
child 34219 d37cfca69887
     1.1 --- a/src/Pure/System/standard_system.scala	Mon Dec 28 22:03:14 2009 +0100
     1.2 +++ b/src/Pure/System/standard_system.scala	Mon Dec 28 22:57:37 2009 +0100
     1.3 @@ -107,8 +107,10 @@
     1.4      for (s <- args) cmdline.add(s)
     1.5  
     1.6      val proc = new ProcessBuilder(cmdline)
     1.7 -    proc.environment.clear
     1.8 -    for ((x, y) <- env) proc.environment.put(x, y)
     1.9 +    if (env != null) {
    1.10 +      proc.environment.clear
    1.11 +      for ((x, y) <- env) proc.environment.put(x, y)
    1.12 +    }
    1.13      proc.redirectErrorStream(redirect)
    1.14  
    1.15      try { proc.start }