Skip to content
Open
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
7 changes: 7 additions & 0 deletions crates/socket-patch-cli/tests/e2e_hosted_production.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ use std::process::{Command, Output};

use socket_patch_cli::args::{GLOBAL_ARG_ENV_VARS, LOCAL_ARG_ENV_VARS};

#[path = "common/cache_env.rs"]
mod cache_env;

// ---------------------------------------------------------------------------
// Production endpoints + required-patch catalog
// ---------------------------------------------------------------------------
Expand Down Expand Up @@ -358,6 +361,10 @@ fn redirected_count(env: &serde_json::Value) -> u64 {
fn tool(cwd: &Path, program: &str, args: &[&str], env: &[(&str, &str)]) -> Output {
let mut cmd = Command::new(program);
cmd.args(args).current_dir(cwd);
// Sandbox everything the per-leg `env` below does not name — corepack's
// downloaded package managers most of all — so a run leaves the caller's
// home alone.
cache_env::isolate(&mut cmd);
// Keep every toolchain's cache inside the fixture so the reinstall leg
// starts genuinely cold and cannot be satisfied from a warm host cache
// holding the *pristine* artifact.
Expand Down
Loading