fix(cli): stop printing subprocess stdin in verbose output (#9350)

`--verbose` printed each subprocess command followed by everything piped
to its stdin, which can hold credentials. It now prints only the command
line, so `langgraph up --verbose`, `langgraph build` and `langgraph
deploy --verbose` no longer show the generated compose file or
Dockerfile (`langgraph dockerfile` still writes the Dockerfile out).
This commit is contained in:
Elior Nataf Lackritz
2026-10-19 13:45:42 +00:00
committed by GitHub
parent 8b9c1a1301
commit 7b23a10846
2 changed files with 19 additions and 5 deletions
+2 -5
View File
@@ -44,11 +44,8 @@ async def subp_exec(
on_stdout: Callable[[str], bool | None] | None = None,
) -> tuple[str | None, str | None]:
if verbose:
cmd_str = f"+ {cmd} {' '.join(map(str, args))}"
if input:
print(cmd_str, " <\n", "\n".join(filter(None, input.splitlines())), sep="")
else:
print(cmd_str)
# Never echo stdin: it can carry secrets (docker login --password-stdin).
print(f"+ {cmd} {' '.join(map(str, args))}")
if wait:
await asyncio.sleep(wait)