Skip to content

Commit 4d4ade7

Browse files
committed
Clarify the venv scrub and format the list
The venv scrub covers every call, not just scan: vex also discovers packages under --cwd. Reformat the two-entry PENDING_RAW_SPAWNS list the way rustfmt wants it. Assisted-by: Claude Code:claude-opus-5-5
1 parent 61f386f commit 4d4ade7

2 files changed

Lines changed: 5 additions & 7 deletions

File tree

‎crates/socket-patch-cli/tests/e2e_redirect_cargo_shapes.rs‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,10 @@ fn run_socket(cwd: &Path, args: &[&str], cargo_home: &Path) -> (i32, String, Str
137137
/// [`run_socket`] with extra env applied after the scrub.
138138
///
139139
/// The child gets the hermetic `SOCKET_*` environment
140-
/// (`hermetic::binary_command`), and an activated venv is scrubbed: the
141-
/// hosted scan is unscoped, so the developer's venv would add packages to
142-
/// it. `CARGO_HOME` is the leg's own, set after the scrubs.
140+
/// (`hermetic::binary_command`), and an activated venv is scrubbed on
141+
/// every call: `scan` and `vex` discover packages unscoped under `--cwd`,
142+
/// so the developer's venv would add packages to them. `CARGO_HOME` is the
143+
/// leg's own, set after the scrubs.
143144
fn run_socket_env(
144145
cwd: &Path,
145146
args: &[&str],

‎crates/socket-patch-cli/tests/spawn_env_hygiene.rs‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,7 @@ use serial_test::serial;
2828
/// Files that still spawn the binary with a bare `Command::new`, so their
2929
/// children see whatever `SOCKET_*` the ambient shell exports unless the file
3030
/// scrubs by hand.
31-
const PENDING_RAW_SPAWNS: &[&str] = &[
32-
"e2e_hosted_production.rs",
33-
"e2e_vendored_production.rs",
34-
];
31+
const PENDING_RAW_SPAWNS: &[&str] = &["e2e_hosted_production.rs", "e2e_vendored_production.rs"];
3532

3633
/// The environment `cmd`'s child would see: the parent environment with
3734
/// `cmd`'s explicit sets and removals applied.

0 commit comments

Comments
 (0)