cli: emit fiwi: start only when stderr is a TTY.

Avoids interleaving the banner with captured stdout (e.g. SSH
port-metrics-json and check_concentrator table output).

Made-with: Cursor
This commit is contained in:
Robert McMahon 2026-04-03 13:39:55 -07:00
parent 6a4fc3dfee
commit 64a3e5a604
1 changed files with 3 additions and 1 deletions

View File

@ -206,7 +206,9 @@ def main() -> int:
if rc_ssh_map is not None: if rc_ssh_map is not None:
return rc_ssh_map return rc_ssh_map
os.write(2, b"fiwi: start\n") # Skip when stderr is a pipe (SSH capture, subprocess): avoids interleaving with stdout consumers.
if sys.stderr.isatty():
os.write(2, b"fiwi: start\n")
try: try:
load_brainstem() load_brainstem()
except Exception as exc: except Exception as exc: