fix(hooks): harden workspace hook loading

This commit is contained in:
Peter Steinberger
2026-03-22 09:37:30 -07:00
parent 1ee9611079
commit 42f23619e3
11 changed files with 221 additions and 17 deletions

View File

@@ -87,6 +87,9 @@ function resolveHookForToggle(
);
}
if (opts?.requireEligible && !hook.eligible) {
if (hook.disabled && hook.requirementsSatisfied) {
return hook;
}
throw new Error(`Hook "${hookName}" is not eligible (missing requirements)`);
}
return hook;