diff options
| author | mo8it <mo8it@proton.me> | 2024-04-16 03:08:45 +0200 |
|---|---|---|
| committer | mo8it <mo8it@proton.me> | 2024-04-16 03:08:45 +0200 |
| commit | 25e7696565349014c5e2662ddba43dc20391e272 (patch) | |
| tree | 2909b00483965a4e48cca7b92756f4092a402578 /src/dev.rs | |
| parent | 92777c0a4498625a44c0e6eeced97633dacc78d1 (diff) | |
Done `dev init`
Diffstat (limited to 'src/dev.rs')
| -rw-r--r-- | src/dev.rs | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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"; |
