summaryrefslogtreecommitdiff
path: root/src/dev.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/dev.rs')
-rw-r--r--src/dev.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/dev.rs b/src/dev.rs
index 40382a8..e09996f 100644
--- a/src/dev.rs
+++ b/src/dev.rs
@@ -1,4 +1,4 @@
-use anyhow::Result;
+use anyhow::{Context, Result};
use clap::Subcommand;
mod check;
@@ -13,8 +13,11 @@ pub enum DevCommands {
impl DevCommands {
pub fn run(self) -> Result<()> {
match self {
- DevCommands::Init => init::init(),
+ DevCommands::Init => init::init().context(INIT_ERR),
DevCommands::Check => check::check(),
}
}
}
+
+const INIT_ERR: &str = "Initialization failed.
+After resolving the issue, delete the `rustlings` directory (if it was created) and try again";