src/Pure/System/isabelle_system.scala
changeset 34219 d37cfca69887
parent 34204 fd76bc33b89b
child 34258 e936d3c35ce0
equal deleted inserted replaced
34218:f65c717952c0 34219:d37cfca69887
    41         val shell_prefix =
    41         val shell_prefix =
    42           if (Platform.is_windows) List(platform_root + "\\bin\\bash", "-l") else Nil
    42           if (Platform.is_windows) List(platform_root + "\\bin\\bash", "-l") else Nil
    43         val cmdline =
    43         val cmdline =
    44           shell_prefix ::: List(isabelle_home + "/bin/isabelle", "getenv", "-d", dump.toString)
    44           shell_prefix ::: List(isabelle_home + "/bin/isabelle", "getenv", "-d", dump.toString)
    45         val (output, rc) =
    45         val (output, rc) =
    46           Standard_System.process_output(Standard_System.raw_execute(env0, true, cmdline: _*))
    46           Standard_System.process_output(Standard_System.raw_execute(null, env0, true, cmdline: _*))
    47         if (rc != 0) error(output)
    47         if (rc != 0) error(output)
    48 
    48 
    49         val entries =
    49         val entries =
    50           for (entry <- Source.fromFile(dump).mkString split "\0" if entry != "") yield {
    50           for (entry <- Source.fromFile(dump).mkString split "\0" if entry != "") yield {
    51             val i = entry.indexOf('=')
    51             val i = entry.indexOf('=')
    64   def execute(redirect: Boolean, args: String*): Process =
    64   def execute(redirect: Boolean, args: String*): Process =
    65   {
    65   {
    66     val cmdline =
    66     val cmdline =
    67       if (Platform.is_windows) List(platform_root + "\\bin\\env.exe") ++ args
    67       if (Platform.is_windows) List(platform_root + "\\bin\\env.exe") ++ args
    68       else args
    68       else args
    69     Standard_System.raw_execute(environment, redirect, cmdline: _*)
    69     Standard_System.raw_execute(null, environment, redirect, cmdline: _*)
    70   }
    70   }
    71 
    71 
    72 
    72 
    73   /* getenv */
    73   /* getenv */
    74 
    74