Skip to main content

test_hook

Function test_hook 

Source
pub async fn test_hook(command: String) -> Result<HookTestOutcome, String>
Expand description

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.