cargo_mobile2/doctor/
mod.rsmod section;
use crate::{
env,
os::Env,
util::{self, cli::TextWrapper},
};
use thiserror::Error;
#[derive(Debug, Error)]
pub enum Unrecoverable {
#[error(transparent)]
EnvInitFailed(#[from] env::Error),
#[error("Failed to prettify path: {0}")]
ContractHomeFailed(#[from] util::ContractHomeError),
}
pub fn exec(wrapper: &TextWrapper) -> Result<(), Unrecoverable> {
let env = Env::new()?;
section::cargo_mobile::check()?.print(wrapper);
#[cfg(target_os = "macos")]
section::apple::check().print(wrapper);
section::android::check(&env)?.print(wrapper);
section::device_list::check(&env).print(wrapper);
Ok(())
}