(&self, args: &[&str])
| 32 | } |
| 33 | |
| 34 | fn command(&self, args: &[&str]) -> Command { |
| 35 | let mut command = Command::new(env!("CARGO_BIN_EXE_atomic")); |
| 36 | // Do not inherit the developer's managed run or daemon transport. |
| 37 | for (name, _) in std::env::vars_os() { |
| 38 | let text = name.to_string_lossy(); |
| 39 | if text.starts_with("ATOMIC_") || text.starts_with("OPENCODE_") { |
| 40 | command.env_remove(name); |
| 41 | } |
| 42 | } |
| 43 | command |
| 44 | .args(args) |
| 45 | .current_dir(self.repo.path()) |
| 46 | .env("HOME", self.home.path()) |
| 47 | .env("ATOMIC_HOME", self.home.path().join(".atomic")) |
| 48 | .env("ATOMIC_CONFIG_DIR", self.home.path().join(".atomic")) |
| 49 | .env("ATOMIC_SERVICE", "local") |
| 50 | .env_remove("ATOMIC_RPC") |
| 51 | .env("ATOMIC_NONINTERACTIVE", "1") |
| 52 | .env("NO_PROXY", "127.0.0.1,localhost") |
| 53 | .env("no_proxy", "127.0.0.1,localhost") |
| 54 | .env("NO_COLOR", "1"); |
| 55 | command |
| 56 | } |
| 57 | |
| 58 | fn output(&self, args: &[&str]) -> Output { |
| 59 | self.command(args).output().expect("run atomic") |
no test coverage detected