use std::path::PathBuf;
use thiserror::Error;
#[derive(Debug, Error)]
pub enum LgtmEnvError {
#[error(transparent)]
Config(#[from] crate::backend::config::LgtmConfigError),
#[error("failed to write managed Mise configuration at {path}: {source}")]
ManagedMiseIo {
path: PathBuf,
#[source]
source: std::io::Error,
},
#[error("failed to serialize Mise configuration: {0}")]
SerializeToml(#[from] toml::ser::Error),
#[error("mise binary is not installed")]
MiseNotInstalled,
#[error("failed to install mise binary: {0}")]
MiseInstallFailed(String),
#[error("mise command failed: {0}")]
MiseFailed(String),
}
pub type Result<T> = std::result::Result<T, LgtmEnvError>;