lix-installer/src/error.rs

20 lines
685 B
Rust
Raw Normal View History

2022-09-02 23:03:57 +00:00
#[derive(thiserror::Error, Debug)]
pub enum HarmonicError {
#[error("Downloading Nix")]
2022-09-02 23:03:57 +00:00
DownloadingNix(#[from] reqwest::Error),
#[error("Unpacking Nix")]
UnpackingNix(std::io::Error),
#[error("Running `groupadd`")]
GroupAddSpawn(std::io::Error),
#[error("`groupadd` returned failure")]
GroupAddFailure(std::process::ExitStatus),
#[error("Running `useradd`")]
UserAddSpawn(std::io::Error),
#[error("`useradd` returned failure")]
UserAddFailure(std::process::ExitStatus),
#[error("Creating directory")]
CreateDirectory(std::io::Error),
#[error("Placing channel configuration")]
PlaceChannelConfiguration(std::io::Error),
2022-09-02 23:03:57 +00:00
}