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

Function atomic

atomic-cli/tests/it/logging_integration_test.rs:18–32  ·  view source on GitHub ↗

Run `atomic` in `dir` with an isolated config dir (`home/.atomic`) and a clean logging environment, plus `envs`. `ATOMIC_CONFIG_DIR` rather than `HOME` alone: on Windows the home directory ignores `HOME`.

(dir: &Path, home: &Path, envs: &[(&str, &OsStr)], args: &[&str])

Source from the content-addressed store, hash-verified

16/// clean logging environment, plus `envs`. `ATOMIC_CONFIG_DIR` rather than
17/// `HOME` alone: on Windows the home directory ignores `HOME`.
18fn atomic(dir: &Path, home: &Path, envs: &[(&str, &OsStr)], args: &[&str]) -> Output {
19 let mut command = Command::new(ATOMIC_BIN);
20 command
21 .args(args)
22 .current_dir(dir)
23 .env("HOME", home)
24 .env("ATOMIC_CONFIG_DIR", home.join(".atomic"))
25 .env_remove("ATOMIC_LOG")
26 .env_remove("ATOMIC_LOG_DIR")
27 .env_remove("RUST_LOG");
28 for (key, value) in envs {
29 command.env(key, value);
30 }
31 command.output().expect("run atomic")
32}
33
34fn git(dir: &Path, args: &[&str]) -> String {
35 let output = Command::new("git")

Calls 1

outputMethod · 0.45

Tested by

no test coverage detected