MCPcopy Create free account
hub / github.com/PerroEngine/Perro / doctor_command

Function doctor_command

perro_source/devtools/perro_cli/src/doctor.rs:13–23  ·  view source on GitHub ↗
(args: &[String], cwd: &Path)

Source from the content-addressed store, hash-verified

11use std::str::FromStr;
12
13pub(crate) fn doctor_command(args: &[String], cwd: &Path) -> Result<(), String> {
14 scripts_command(args, cwd).map_err(|err| format!("check failed: {err}"))?;
15
16 let project_dir = parse_flag_value(args, "--path")
17 .map(|p| resolve_local_path(&p, cwd))
18 .unwrap_or_else(|| cwd.to_path_buf());
19 let project_dir = project_dir.canonicalize().unwrap_or(project_dir);
20 validate_project_and_print(&project_dir)?;
21 log_done("Project Valid");
22 Ok(())
23}
24
25pub(crate) fn validate_project_and_print(project_dir: &Path) -> Result<(), String> {
26 let report = validate_project(project_dir)?;

Callers 1

mainFunction · 0.85

Calls 5

scripts_commandFunction · 0.85
log_doneFunction · 0.85
parse_flag_valueFunction · 0.70
resolve_local_pathFunction · 0.70

Tested by

no test coverage detected