Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions codex-rs/core/tests/suite/live_cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ fn run_live(prompt: &str) -> (assert_cmd::assert::Assert, TempDir) {
use std::thread;

let dir = TempDir::new().unwrap();
let home = TempDir::new().unwrap();
let codex_home = home.path().join(".codex");
std::fs::create_dir_all(&codex_home).unwrap();

// Build a plain `std::process::Command` so we have full control over the underlying stdio
// handles. `assert_cmd`’s own `Command` wrapper always forces stdout/stderr to be piped
Expand All @@ -33,6 +36,8 @@ fn run_live(prompt: &str) -> (assert_cmd::assert::Assert, TempDir) {
let mut cmd = Command::new(codex_utils_cargo_bin::cargo_bin("codex-rs").unwrap());
cmd.current_dir(dir.path());
cmd.env("OPENAI_API_KEY", require_api_key());
cmd.env("HOME", home.path());
cmd.env("CODEX_HOME", &codex_home);

// We want three things at once:
// 1. live streaming of the child’s stdout/stderr while the test is running
Expand Down
Loading