cc-safe-setup 28.4.3 → 28.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.mjs +4 -4
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1573,7 +1573,7 @@ async function guard(description) {
1573
1573
  if (!settings.hooks) settings.hooks = {};
1574
1574
  if (!settings.hooks[trigger]) settings.hooks[trigger] = [];
1575
1575
 
1576
- const cmd = `bash ${hookPath}`;
1576
+ const cmd = `bash ${toBashPath(hookPath)}`;
1577
1577
  const alreadyExists = JSON.stringify(settings.hooks).includes(hookName);
1578
1578
  if (!alreadyExists) {
1579
1579
  const existing = settings.hooks[trigger].find(e => e.matcher === matcher);
@@ -2435,7 +2435,7 @@ async function shield() {
2435
2435
 
2436
2436
  for (const f of hookFiles) {
2437
2437
  const content = readFileSync(join(HOOKS_DIR, f), 'utf-8');
2438
- const cmd = `bash ${join(HOOKS_DIR, f)}`;
2438
+ const cmd = `bash ${toBashPath(join(HOOKS_DIR, f))}`;
2439
2439
 
2440
2440
  // Check if already in settings
2441
2441
  const alreadyConfigured = JSON.stringify(settings.hooks).includes(f);
@@ -4557,7 +4557,7 @@ FILE=$(echo "$INPUT" | jq -r '.tool_input.file_path // empty' 2>/dev/null)
4557
4557
  if (!settings.hooks) settings.hooks = {};
4558
4558
  if (!settings.hooks.PreToolUse) settings.hooks.PreToolUse = [];
4559
4559
 
4560
- const hookCmd = `bash ${hookPath}`;
4560
+ const hookCmd = `bash ${toBashPath(hookPath)}`;
4561
4561
 
4562
4562
  // Check all matchers for existing compiled-rules entry
4563
4563
  let found = false;
@@ -4679,7 +4679,7 @@ exit 0
4679
4679
  if (!settings.hooks.PreToolUse) settings.hooks.PreToolUse = [];
4680
4680
 
4681
4681
  // Register under specific matchers based on rule types (NEVER use "" matcher)
4682
- const hookCmd = `bash ${hookPath}`;
4682
+ const hookCmd = `bash ${toBashPath(hookPath)}`;
4683
4683
  const hasBlocks = rules.some(r => r.type === 'block');
4684
4684
  const hasApproves = rules.some(r => r.type === 'approve');
4685
4685
  const hasProtects = rules.some(r => r.type === 'protect');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc-safe-setup",
3
- "version": "28.4.3",
3
+ "version": "28.4.4",
4
4
  "description": "One command to make Claude Code safe. 336 hooks (8 built-in + 328 examples). 49 CLI commands. 980 tests. 5 languages.",
5
5
  "main": "index.mjs",
6
6
  "bin": {