(command: &[String])
| 206 | |
| 207 | #[must_use] |
| 208 | pub fn detect_provider_from_command(command: &[String]) -> Option<&'static str> { |
| 209 | let first = command.first()?; |
| 210 | let basename = Path::new(first) |
| 211 | .file_name() |
| 212 | .and_then(|name| name.to_str()) |
| 213 | .unwrap_or(first); |
| 214 | normalize_provider_type(basename) |
| 215 | } |
| 216 | |
| 217 | #[cfg(test)] |
| 218 | mod tests { |
no test coverage detected