1use std::io;
4use std::path::PathBuf;
5use thiserror::Error;
6
7pub type Result<T> = std::result::Result<T, SetupError>;
9
10#[derive(Error, Debug)]
12pub enum SetupError {
13 #[error("I/O error: {0}")]
15 Io(#[from] io::Error),
16
17 #[error("File already exists: {path}. Use --force to overwrite")]
19 FileExists { path: PathBuf },
20
21 #[error("Invalid architecture type: '{0}'. Currently supported: 'clean'")]
23 InvalidArchitecture(String),
24
25 #[error("Git operation failed: {0}")]
27 Git(String),
28
29 #[error("{0}")]
31 Other(String),
32}