Function
try_read_openclaw_config_path
(clawshell_config_file: &Path)
Source from the content-addressed store, hash-verified
| 115 | } |
| 116 | |
| 117 | fn try_read_openclaw_config_path(clawshell_config_file: &Path) -> Option<PathBuf> { |
| 118 | let config_content = std::fs::read_to_string(clawshell_config_file).ok()?; |
| 119 | let config_json = serde_json::from_str::<serde_json::Value>(&config_content).ok()?; |
| 120 | config_json |
| 121 | .get("openclaw_config_path") |
| 122 | .and_then(|v| v.as_str()) |
| 123 | .map(PathBuf::from) |
| 124 | } |
| 125 | |
| 126 | #[derive(Debug, Clone)] |
| 127 | struct WrittenOpenclawSkill { |
Tested by
no test coverage detected