Run a hook command, piping input as JSON to its stdin, and report the exit
code + parsed decision. Synchronous (so it can be used inside an eval's
measure too). command is run through a shell, so the same command string a
plugin ships (with args / env refs) works verbatim. Mark a hook you didn't
write with trusted: false and it is confined by default (or pass sandbox: "auto" directly) — see RunScriptOptions.trusted.
Testing a program that is NOT a hook? Use runScript.
Run a hook command, piping
inputas JSON to its stdin, and report the exit code + parsed decision. Synchronous (so it can be used inside an eval'smeasuretoo).commandis run through a shell, so the same command string a plugin ships (with args / env refs) works verbatim. Mark a hook you didn't write withtrusted: falseand it is confined by default (or passsandbox: "auto"directly) — see RunScriptOptions.trusted.Testing a program that is NOT a hook? Use runScript.