use std::fmt::Debug;
use thiserror::Error;
#[derive(Error, Debug)]
#[non_exhaustive]
pub enum CliError {
#[error(transparent)]
LoggingError(#[from] crate::config::LoggingError),
#[error(transparent)]
InvalidPath(#[from] std::io::Error),
#[error(transparent)]
CommandLineParsingError(#[from] clap::Error),
#[error(transparent)]
MatchingError(#[from] clap::parser::MatchesError),
#[error(transparent)]
InvalidConfigFile(#[from] crate::config::ConfigError),
#[error(transparent)]
CommandError(#[from] crate::commands::CommandError),
#[error("Invalid target directory. The target directory must exist and be a directory.")]
InvalidTargetDirectory,
#[error(transparent)]
StripPrefixError(#[from] std::path::StripPrefixError),
#[error("Invalid configuration file: {0}")]
InvalidConfigurationFile(String),
#[error(transparent)]
CommandBuildError(#[from] crate::commands::CommandBuildError),
#[error(transparent)]
ResolveError(#[from] crate::config::ResolveError),
}