(&self)
| 174 | |
| 175 | #[cfg(not(test))] |
| 176 | fn config_dir(&self) -> Option<PathBuf> { |
| 177 | // First check XDG_CONFIG_HOME environment variable explicitly |
| 178 | if let Ok(xdg_config) = std::env::var("XDG_CONFIG_HOME") { |
| 179 | let path = PathBuf::from(xdg_config).join("cargo-lambda"); |
| 180 | if path.exists() { |
| 181 | return Some(path); |
| 182 | } |
| 183 | } |
| 184 | |
| 185 | // Fall back to dirs::config_dir() |
| 186 | dirs::config_dir().map(|p| p.join("cargo-lambda")) |
| 187 | } |
| 188 | |
| 189 | #[cfg(test)] |
| 190 | fn config_dir(&self) -> Option<PathBuf> { |
no outgoing calls
no test coverage detected