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

Method run_at

atomic-cli/tests/it/diagnostics_integration_test.rs:45–70  ·  view source on GitHub ↗
(&self, work: &Path, args: &[&str])

Source from the content-addressed store, hash-verified

43 }
44
45 fn run_at(&self, work: &Path, args: &[&str]) -> Output {
46 let mut command = Command::new(&self.binary);
47 for (name, _) in std::env::vars_os() {
48 if name.to_string_lossy().starts_with("ATOMIC_")
49 || name.to_string_lossy().starts_with("GIT_")
50 {
51 command.env_remove(name);
52 }
53 }
54 command
55 .args(args)
56 .current_dir(work)
57 .env("HOME", self.home.path())
58 .env("ATOMIC_HOME", self.home.path().join(".atomic"))
59 .env("ATOMIC_CONFIG_DIR", self.home.path().join(".atomic"))
60 .env("ATOMIC_NONINTERACTIVE", "1")
61 .env("XDG_CONFIG_HOME", self.home.path().join(".config"))
62 .env("XDG_DATA_HOME", self.home.path().join(".local/share"))
63 .env("XDG_CACHE_HOME", self.home.path().join(".cache"))
64 .env("XDG_STATE_HOME", self.home.path().join(".local/state"))
65 .env("GIT_CONFIG_NOSYSTEM", "1")
66 .env("GIT_CONFIG_GLOBAL", "/dev/null")
67 .env("NO_COLOR", "1")
68 .output()
69 .expect("run atomic")
70 }
71
72 fn ok_at(&self, work: &Path, args: &[&str]) -> String {
73 let output = self.run_at(work, args);

Callers 2

runMethod · 0.80
ok_atMethod · 0.80

Calls 2

outputMethod · 0.45
pathMethod · 0.45

Tested by

no test coverage detected