Skip to main content

upsert_settings_hook_command

Function upsert_settings_hook_command 

Source
pub fn upsert_settings_hook_command(
    doc: &mut Value,
    event: &str,
    command_path: &str,
) -> SettingsHookOutcome
Expand description

Ensure doc.hooks.{event} contains an entry referencing command_path. Returns whether the document was mutated.

We never edit existing entries in place; we either find a matching spool entry or append a new one. Sibling entries (other tools) are untouched.