SSH remote fiwi: run Python with -u for captured stdout over pipes.
Without a TTY, libc/BrainStem output can stay block-buffered while the SSH client captures the remote stdout pipe, so discover could exit 0 with an empty transcript. Unbuffered mode fixes test_read_remote and invoke_capture. Made-with: Cursor
This commit is contained in:
parent
91a2bee58b
commit
066dbc1d39
|
|
@ -550,13 +550,16 @@ class SshNode:
|
|||
@classmethod
|
||||
def _fiwi_remote_shell_command(cls, cfg: SshNodeConfig, remote_args: List[str]) -> str:
|
||||
"""
|
||||
Single remote command string for ``bash -lc`` so ``~/`` in ``FIWI_REMOTE_*`` paths expands
|
||||
Single remote command string for ``bash -lc`` so ``~/`` in ``FIWI_REMOTE_*`` paths expand
|
||||
on the *remote* host (quoted tilde literals would not).
|
||||
|
||||
``-u`` forces unbuffered stdout/stderr so SSH pipe capture (no TTY) still receives
|
||||
BrainStem and libc output from ``discover`` and similar commands.
|
||||
"""
|
||||
py = cls.remote_path_bash_word(cfg.python)
|
||||
sc = cls.remote_path_bash_word(cfg.script)
|
||||
tail = " ".join(shlex.quote(p) for p in remote_args)
|
||||
return f"{py} {sc}" + (f" {tail}" if tail else "")
|
||||
return f"{py} -u {sc}" + (f" {tail}" if tail else "")
|
||||
|
||||
def _fiwi_cmd_argv(self, cfg: SshNodeConfig, remote_args: List[str]) -> List[str]:
|
||||
inner = self._fiwi_remote_shell_command(cfg, remote_args)
|
||||
|
|
|
|||
Loading…
Reference in New Issue