feat(cli): improve error messages in mobile commands

This commit is contained in:
Lucas Nogueira 2022-08-23 11:34:16 -03:00
parent e56a9dd729
commit a70f7b26bc
No known key found for this signature in database
GPG Key ID: FFEA6C72E73482F1
4 changed files with 4 additions and 4 deletions

View File

@ -67,7 +67,7 @@ pub fn command(options: Options) -> Result<()> {
let env = Env::new().map_err(Error::EnvInitFailed)?;
init_dot_cargo(root_conf, Some(&env)).map_err(Error::InitDotCargo)?;
run_build(options, config, env).map_err(|e| Error::BuildFailed(e.to_string()))
run_build(options, config, env).map_err(|e| Error::BuildFailed(format!("{:#}", e)))
})
.map_err(Into::into)
}

View File

@ -56,7 +56,7 @@ pub fn command(options: Options) -> Result<()> {
with_config(|root_conf, config, metadata| {
ensure_init(config.project_dir(), MobileTarget::Android)
.map_err(|e| Error::ProjectNotInitialized(e.to_string()))?;
run_dev(options, root_conf, config, metadata).map_err(|e| Error::DevFailed(e.to_string()))
run_dev(options, root_conf, config, metadata).map_err(|e| Error::DevFailed(format!("{:#}", e)))
})
.map_err(Into::into)
}

View File

@ -68,7 +68,7 @@ pub fn command(options: Options) -> Result<()> {
let env = env()?;
init_dot_cargo(root_conf, None).map_err(Error::InitDotCargo)?;
run_build(options, config, env).map_err(|e| Error::BuildFailed(e.to_string()))
run_build(options, config, env).map_err(|e| Error::BuildFailed(format!("{:#}", e)))
})
.map_err(Into::into)
}

View File

@ -56,7 +56,7 @@ pub fn command(options: Options) -> Result<()> {
with_config(|root_conf, config, _metadata| {
ensure_init(config.project_dir(), MobileTarget::Ios)
.map_err(|e| Error::ProjectNotInitialized(e.to_string()))?;
run_dev(options, root_conf, config).map_err(|e| Error::DevFailed(e.to_string()))
run_dev(options, root_conf, config).map_err(|e| Error::DevFailed(format!("{:#}", e)))
})
.map_err(Into::into)
}