Skip to main content

extract_path

Function extract_path 

Source
pub fn extract_path(hook_json: &str) -> Option<String>
Expand description

The edited file’s path, out of the hook protocol’s stdin JSON (tool_input.file_path). None for anything else — malformed JSON, a tool event without a path — because the hook’s silence must be total on input it does not understand.