mirror of
https://github.com/RightNow-AI/openfang.git
synced 2026-07-30 06:32:17 +00:00
fix(claude-code): inject HOME and null stdin in stream() subprocess
Mirror the same environment fixes applied to complete(): inject HOME so the CLI locates ~/.claude/credentials when running as a service, and set stdin to null so the process does not block on interactive input. Refs: RightNow-AI/openfang#295
This commit is contained in:
@@ -474,6 +474,11 @@ impl LlmDriver for ClaudeCodeDriver {
|
||||
|
||||
Self::apply_env_filter(&mut cmd);
|
||||
|
||||
// Same HOME and stdin hygiene as the non-streaming path.
|
||||
if let Some(home) = home_dir() {
|
||||
cmd.env("HOME", &home);
|
||||
}
|
||||
cmd.stdin(std::process::Stdio::null());
|
||||
cmd.stdout(std::process::Stdio::piped());
|
||||
cmd.stderr(std::process::Stdio::piped());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user