MCPcopy Index your code
hub / github.com/cargo-lambda/cargo-lambda / install_options

Function install_options

crates/cargo-lambda-build/src/zig.rs:189–227  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

187}
188
189pub 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}

Callers 2

check_installationFunction · 0.85
get_zig_infoFunction · 0.85

Calls 2

newFunction · 0.85
pushMethod · 0.80

Tested by

no test coverage detected