From 42a43189fc94a2e8351a676a68103f6ef334c972 Mon Sep 17 00:00:00 2001 From: glyph Date: Thu, 4 Nov 2021 16:57:58 +0200 Subject: [PATCH] add no_home_dir error --- src/error.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/error.rs b/src/error.rs index ad37b93..8abddbc 100644 --- a/src/error.rs +++ b/src/error.rs @@ -20,6 +20,7 @@ pub enum SbotCliError { InvalidUtf8(Utf8Error), // external errors InvalidRegex(RegexError), + NoHomeDir, } impl error::Error for SbotCliError {} @@ -57,6 +58,12 @@ impl fmt::Display for SbotCliError { SbotCliError::InvalidRegex(ref err) => { write!(f, "{}", err) } + SbotCliError::NoHomeDir => { + write!( + f, + "Error initialising sbotcli: no home directory could be determined" + ) + } } } }