# HG changeset patch # User wenzelm # Date 1628769345 -7200 # Node ID dd1639961016102d9270e7e6529b6a33709207f8 # Parent 608f8ae89cac8c83a9414bbeb14f8b56211f2707 clarified signature; diff -r 608f8ae89cac -r dd1639961016 src/Pure/System/isabelle_system.scala --- a/src/Pure/System/isabelle_system.scala Thu Aug 12 13:19:56 2021 +0200 +++ b/src/Pure/System/isabelle_system.scala Thu Aug 12 13:55:45 2021 +0200 @@ -7,7 +7,7 @@ package isabelle -import java.util.{Map => JMap} +import java.util.{Map => JMap, HashMap} import java.io.{File => JFile, IOException} import java.nio.file.{Path => JPath, Files, SimpleFileVisitor, FileVisitResult, StandardCopyOption, FileSystemException} @@ -20,7 +20,16 @@ { /* settings */ - def settings(): JMap[String, String] = isabelle.setup.Environment.settings() + def settings(putenv: List[(String, String)] = Nil): JMap[String, String] = + { + val env0 = isabelle.setup.Environment.settings() + if (putenv.isEmpty) env0 + else { + val env = new HashMap(env0) + for ((a, b) <- putenv) env.put(a, b) + env + } + } def getenv(name: String, env: JMap[String, String] = settings()): String = Option(env.get(name)).getOrElse("")