MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / resolve_skill_path

Function resolve_skill_path

crates/opencode-tool/src/skill.rs:44–57  ·  view source on GitHub ↗
(base: &Path, raw: &str)

Source from the content-addressed store, hash-verified

42}
43
44fn resolve_skill_path(base: &Path, raw: &str) -> PathBuf {
45 if let Some(stripped) = raw.strip_prefix("~/") {
46 if let Some(home) = home_dir() {
47 return home.join(stripped);
48 }
49 }
50
51 let path = PathBuf::from(raw);
52 if path.is_absolute() {
53 path
54 } else {
55 base.join(path)
56 }
57}
58
59fn collect_skill_roots(base: &Path) -> Vec<PathBuf> {
60 let mut roots = Vec::new();

Callers 1

collect_skill_rootsFunction · 0.85

Calls 1

home_dirFunction · 0.85

Tested by

no test coverage detected