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

Function atomic_env

atomic-cli/tests/it/git_import_cb9c_test.rs:73–87  ·  view source on GitHub ↗
(root: &Path, home: &Path, args: &[&str], extra_env: &[(&str, &str)])

Source from the content-addressed store, hash-verified

71
72#[cfg(feature = "adoption-test-injection")]
73fn atomic_env(root: &Path, home: &Path, args: &[&str], extra_env: &[(&str, &str)]) -> Output {
74 let mut command = Command::new(ATOMIC_BIN);
75 command
76 .args(args)
77 .current_dir(root)
78 .env("HOME", home)
79 .env("ATOMIC_HOME", home.join(".atomic"));
80 if args.starts_with(&["git", "import"]) {
81 command.arg("--no-stream");
82 }
83 for (key, value) in extra_env {
84 command.env(key, value);
85 }
86 command.output().expect("run atomic with env")
87}
88
89fn atomic_text(output: &Output) -> String {
90 format!(

Calls 1

outputMethod · 0.45

Tested by

no test coverage detected