--- a/src/Pure/System/bash.scala Sat Jun 01 14:33:38 2024 +0200
+++ b/src/Pure/System/bash.scala Sat Jun 01 14:56:24 2024 +0200
@@ -115,7 +115,9 @@
private val timing = Synchronized[Option[Timing]](None)
def get_timing: Timing = timing.value getOrElse Timing.zero
- ssh.write(script_file, winpid_script + script)
+ ssh.write(script_file,
+ if (ssh.is_local) winpid_script + script
+ else Bash.context(script, cwd = cwd))
private val ssh_file: Option[JFile] =
ssh.ssh_session match {
@@ -140,7 +142,7 @@
private val proc =
isabelle.setup.Environment.process_builder(
proc_command,
- if (cwd == null || cwd.is_current) null else cwd.file,
+ if (!ssh.is_local || cwd == null || cwd.is_current) null else cwd.file,
env,
redirect
).start()