diff --git a/crates/openshell-cli/tests/sandbox_create_lifecycle_integration.rs b/crates/openshell-cli/tests/sandbox_create_lifecycle_integration.rs index 7ed148304..9bac31da4 100644 --- a/crates/openshell-cli/tests/sandbox_create_lifecycle_integration.rs +++ b/crates/openshell-cli/tests/sandbox_create_lifecycle_integration.rs @@ -1921,26 +1921,29 @@ async fn run_cli_sandbox_create( fs::copy(server.dir.path().join(filename), tls_dir.join(filename)).unwrap(); } - tokio::process::Command::new(env!("CARGO_BIN_EXE_openshell")) - .args([ - "--gateway", - "openshell", - "--gateway-endpoint", - &server.endpoint, - "sandbox", - "create", - "--name", - name, - "--no-tty", - "--no-auto-providers", - ]) - .args(extra_args) - .env("XDG_CONFIG_HOME", xdg_dir.path()) - .env("HOME", xdg_dir.path()) - .env("OPENSHELL_PROVISION_TIMEOUT", "5") - .output() - .await - .unwrap() + let mut cmd = tokio::process::Command::new(env!("CARGO_BIN_EXE_openshell")); + for (key, _) in std::env::vars().filter(|(k, _)| k.starts_with("OPENSHELL_")) { + cmd.env_remove(&key); + } + cmd.args([ + "--gateway", + "openshell", + "--gateway-endpoint", + &server.endpoint, + "sandbox", + "create", + "--name", + name, + "--no-tty", + "--no-auto-providers", + ]) + .args(extra_args) + .env("XDG_CONFIG_HOME", xdg_dir.path()) + .env("HOME", xdg_dir.path()) + .env("OPENSHELL_PROVISION_TIMEOUT", "5") + .output() + .await + .unwrap() } #[tokio::test]