MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / run_in

Function run_in

atomic-cli/tests/it/remove_recorded_path_test.rs:29–40  ·  view source on GitHub ↗

Run from an explicit working directory. The handler resolves every path it deletes against the repository root, so where the command was invoked from must not change what it removes — in reactor mode the daemon's own working directory is never the repository at all.

(cwd: &Path, root: &Path, args: &[&str])

Source from the content-addressed store, hash-verified

27/// must not change what it removes — in reactor mode the daemon's own working
28/// directory is never the repository at all.
29fn run_in(cwd: &Path, root: &Path, args: &[&str]) -> Output {
30 Command::new(env!("CARGO_BIN_EXE_atomic"))
31 .current_dir(cwd)
32 .args(args)
33 .env("ATOMIC_HOME", root.join(".atomic/test-home"))
34 .env_remove("ATOMIC_RPC")
35 .env("ATOMIC_SERVICE", "local")
36 .env("ATOMIC_NONINTERACTIVE", "1")
37 .env("NO_COLOR", "1")
38 .output()
39 .unwrap()
40}
41
42/// Combined stdout+stderr, for assertions that target either stream.
43fn output_text(output: &Output) -> String {

Callers 2

runFunction · 0.85

Calls 2

unwrapMethod · 0.45
outputMethod · 0.45

Tested by

no test coverage detected