mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-05-20 19:29:58 +08:00
fix(hooks): avoid escaped quotes in plugin bootstrap
Generate the inline hook root resolver with single-quoted JavaScript literals so Windows Git Bash does not choke on nested escaped double quotes before Node starts. Refresh hooks.json and add regression coverage for parsed hook commands and installed hook manifests.
This commit is contained in:
committed by
Affaan Mustafa
parent
f93e8f6869
commit
6cb194a3c6
@@ -997,6 +997,13 @@ async function runTests() {
|
||||
(Array.isArray(command) && typeof command[0] === 'string' && command[0].endsWith('.sh')) ||
|
||||
commandText.endsWith('.sh');
|
||||
|
||||
if (isInline) {
|
||||
assert.ok(
|
||||
!commandText.includes('\\"'),
|
||||
`Hook command in ${hookType} should not include escaped double quotes in node -e payload: ${commandText.substring(0, 80)}`
|
||||
);
|
||||
}
|
||||
|
||||
assert.ok(
|
||||
isInline || isFilePath || isNpx || isShellWrapper || isShellScriptPath,
|
||||
`Hook command in ${hookType} should be node -e, node script, npx, or shell wrapper/script, got: ${commandText.substring(0, 80)}`
|
||||
|
||||
Reference in New Issue
Block a user