Skip to main content

Module hooks

Module hooks 

Source

StructsΒ§

DialogBusyGuard πŸ”’

ConstantsΒ§

HOOK_DIALOG_ALLOW πŸ”’
HOOK_DIALOG_CANCEL πŸ”’
HOOK_DIALOG_MAX_BODY_CHARS πŸ”’
HOOK_DIALOG_MAX_HOOKS_SHOWN πŸ”’
HOOK_DIALOG_PER_HOOK_CHARS πŸ”’

FunctionsΒ§

confirm_hooks_change πŸ”’
format_hooks_summary πŸ”’
sanitize_for_dialog πŸ”’
set_hooks
Replace the active profile’s hook list, gated by a native confirmation dialog. The dialog shows the proposed hooks (with control characters sanitised) so the user can spot tampering.
test_hook
Run a single hook command once and return its captured stdout/stderr and exit status, so the Settings β€œTest” button can show the user what a command does before they rely on it. Runs with a representative $ENTRACTE_* env and a short timeout, off the async runtime since the capture blocks. No confirmation dialog: the user typed and triggered this command themselves β€” the dialog guards persisting hooks, not a transient user-initiated test.