Install Zig using a choice prompt.
(options: Vec<InstallOption>)
| 30 | |
| 31 | /// Install Zig using a choice prompt. |
| 32 | pub async fn install_zig_interactive(options: Vec<InstallOption>) -> Result<()> { |
| 33 | let choice = choose_option("Pick an option to install it:", options); |
| 34 | |
| 35 | match choice { |
| 36 | Ok(choice) => choice.install().await.map(|_| ()), |
| 37 | Err(err) => Err(err).into_diagnostic(), |
| 38 | } |
| 39 | } |
| 40 | |
| 41 | pub async fn check_installation() -> Result<ZigInfo> { |
| 42 | if let Ok((path, run_modifiers)) = Zig::find_zig() { |
no test coverage detected