summaryrefslogtreecommitdiff
path: root/src/dev.rs
diff options
context:
space:
mode:
authormo8it <mo8it@proton.me>2024-04-16 03:08:45 +0200
committermo8it <mo8it@proton.me>2024-04-16 03:08:45 +0200
commit25e7696565349014c5e2662ddba43dc20391e272 (patch)
tree2909b00483965a4e48cca7b92756f4092a402578 /src/dev.rs
parent92777c0a4498625a44c0e6eeced97633dacc78d1 (diff)
Done `dev init`
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";