()
| 187 | } |
| 188 | |
| 189 | pub fn install_options() -> Vec<InstallOption> { |
| 190 | let mut options = Vec::new(); |
| 191 | |
| 192 | #[cfg(not(windows))] |
| 193 | if which::which("brew").is_ok() { |
| 194 | options.push(InstallOption::Brew); |
| 195 | } |
| 196 | |
| 197 | #[cfg(windows)] |
| 198 | if which::which("choco").is_ok() { |
| 199 | options.push(InstallOption::Choco); |
| 200 | } |
| 201 | |
| 202 | #[cfg(not(windows))] |
| 203 | if which::which("nix-env").is_ok() { |
| 204 | options.push(InstallOption::Nix); |
| 205 | } |
| 206 | |
| 207 | #[cfg(not(windows))] |
| 208 | if which::which("npm").is_ok() { |
| 209 | options.push(InstallOption::Npm); |
| 210 | } |
| 211 | |
| 212 | if which::which("pip3").is_ok() { |
| 213 | options.push(InstallOption::Pip3); |
| 214 | } |
| 215 | |
| 216 | #[cfg(windows)] |
| 217 | if which::which("scoop").is_ok() { |
| 218 | options.push(InstallOption::Scoop); |
| 219 | } |
| 220 | |
| 221 | #[cfg(windows)] |
| 222 | if which::which("winget").is_ok() { |
| 223 | options.push(InstallOption::Winget); |
| 224 | } |
| 225 | |
| 226 | options |
| 227 | } |
no test coverage detected