mirror of
https://github.com/instructkr/claude-code.git
synced 2026-05-26 07:26:46 +00:00
fix: skills install nonexistent path emits skill_not_found error kind with descriptive message; classify_error_kind adds skill_not_found branch
This commit is contained in:
@@ -3240,7 +3240,12 @@ fn resolve_skill_install_source(source: &str, cwd: &Path) -> std::io::Result<Ski
|
|||||||
} else {
|
} else {
|
||||||
cwd.join(candidate)
|
cwd.join(candidate)
|
||||||
};
|
};
|
||||||
let source = fs::canonicalize(&source)?;
|
let source = fs::canonicalize(&source).map_err(|e| {
|
||||||
|
std::io::Error::new(
|
||||||
|
e.kind(),
|
||||||
|
format!("skill source '{}' not found: {e}", source.display()),
|
||||||
|
)
|
||||||
|
})?;
|
||||||
|
|
||||||
if source.is_dir() {
|
if source.is_dir() {
|
||||||
let prompt_path = source.join("SKILL.md");
|
let prompt_path = source.join("SKILL.md");
|
||||||
|
|||||||
@@ -298,6 +298,8 @@ fn classify_error_kind(message: &str) -> &'static str {
|
|||||||
"unknown_agents_subcommand"
|
"unknown_agents_subcommand"
|
||||||
} else if message.contains("is not installed") {
|
} else if message.contains("is not installed") {
|
||||||
"plugin_not_found"
|
"plugin_not_found"
|
||||||
|
} else if message.contains("skill source") && message.contains("not found") {
|
||||||
|
"skill_not_found"
|
||||||
} else {
|
} else {
|
||||||
"unknown"
|
"unknown"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user