feat: with doctor
Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
parent
b5e8c78c89
commit
64c87d3192
@ -221,6 +221,20 @@ impl Command {
|
||||
}
|
||||
}
|
||||
}
|
||||
Some(Commands::Doctor {}) => {
|
||||
match std::process::Command::new("git").arg("-v").output() {
|
||||
Ok(o) => {
|
||||
let stdout = std::str::from_utf8(&o.stdout).unwrap_or("".into());
|
||||
self.ui.write_str_ln(&format!("OK: {}", stdout));
|
||||
}
|
||||
Err(e) => {
|
||||
self.ui.write_str_ln(&format!(
|
||||
"WARNING: git is not installed: {}",
|
||||
e.to_string()
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
None => {
|
||||
tracing::debug!("running bare command");
|
||||
// 2. Parse the cuddle.please.yaml let cuddle.please.yaml take precedence
|
||||
@ -277,6 +291,8 @@ enum Commands {
|
||||
#[command(subcommand)]
|
||||
command: GiteaCommand,
|
||||
},
|
||||
/// Helps you identify missing things from your execution environment for cuddle-please to function as intended
|
||||
Doctor {},
|
||||
}
|
||||
|
||||
#[derive(Subcommand, Debug, Clone)]
|
||||
|
Loading…
Reference in New Issue
Block a user