1use thiserror::Error;
2
3#[derive(Debug, Error)]
7pub enum CiError {
8 #[error("the `{0}` CLI is not installed or not on PATH")]
9 CliMissing(&'static str),
10 #[error("`{cmd}` failed: {message}")]
11 Exec { cmd: String, message: String },
12 #[error("parsing {what}: {message}")]
13 Parse { what: String, message: String },
14 #[error("not found: {0}")]
15 NotFound(String),
16 #[error("unsupported by this provider: {0}")]
17 Unsupported(&'static str),
18}
19
20pub type Result<T> = std::result::Result<T, CiError>;