src/Pure/System/other_isabelle.scala
changeset 80231 a2cf0318db4a
parent 80227 af6b60c75d7d
child 80232 99ae8c664667
--- a/src/Pure/System/other_isabelle.scala	Sat Jun 01 15:11:46 2024 +0200
+++ b/src/Pure/System/other_isabelle.scala	Sat Jun 01 15:13:03 2024 +0200
@@ -43,19 +43,20 @@
 
   /* static system */
 
-  def bash_context(script: String): String =
+  def bash_context(script: String, cwd: Path = isabelle_home): String =
     Bash.context(script,
       user_home = ssh.user_home,
       isabelle_identifier = isabelle_identifier,
-      cwd = isabelle_home)
+      cwd = cwd)
 
   def bash(
     script: String,
+    cwd: Path = isabelle_home,
     redirect: Boolean = false,
     echo: Boolean = false,
     strict: Boolean = true
   ): Process_Result = {
-    ssh.execute(bash_context(script),
+    ssh.execute(bash_context(script, cwd = cwd),
       progress_stdout = progress.echo_if(echo, _),
       progress_stderr = progress.echo_if(echo, _),
       redirect = redirect,