mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-06-23 10:42:00 +00:00
fix(computer-use): set stdin=DEVNULL on cua-driver subprocess calls
The subprocess-stdin guard (TUI gateway fd-inheritance protection) flagged the `permissions grant` call. None of the cua-driver probes/grant read stdin, so DEVNULL is correct; apply it to the shared `_run` helper and the grant call.
This commit is contained in:
parent
2dfcead683
commit
3c1058e2e9
1 changed files with 8 additions and 1 deletions
|
|
@ -63,6 +63,7 @@ def _run(binary: str, *args: str, timeout: float) -> subprocess.CompletedProcess
|
|||
text=True,
|
||||
timeout=timeout,
|
||||
env=_child_env(),
|
||||
stdin=subprocess.DEVNULL,
|
||||
)
|
||||
|
||||
|
||||
|
|
@ -174,7 +175,13 @@ def request_permissions_grant(driver_cmd: Optional[str] = None) -> int:
|
|||
"approve it, then return here."
|
||||
)
|
||||
try:
|
||||
return int(subprocess.run([binary, "permissions", "grant"], env=_child_env()).returncode)
|
||||
return int(
|
||||
subprocess.run(
|
||||
[binary, "permissions", "grant"],
|
||||
env=_child_env(),
|
||||
stdin=subprocess.DEVNULL,
|
||||
).returncode
|
||||
)
|
||||
except KeyboardInterrupt: # pragma: no cover - interactive
|
||||
return 130
|
||||
except Exception as exc: # pragma: no cover - defensive
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue