cc-safe-setup 28.4.6 → 28.4.7
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.
- package/README.md +14 -0
- package/index.mjs +25 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -328,6 +328,20 @@ Or browse all available examples in [`examples/`](examples/):
|
|
|
328
328
|
|
|
329
329
|
**[SAFETY_CHECKLIST.md](SAFETY_CHECKLIST.md)** — Copy-paste checklist for before/during/after autonomous sessions.
|
|
330
330
|
|
|
331
|
+
## Windows Support
|
|
332
|
+
|
|
333
|
+
Works on Windows via WSL or Git Bash. Native PowerShell is not supported (hooks are bash scripts).
|
|
334
|
+
|
|
335
|
+
**Common issue:** If you see `Permission denied` or `No such file` errors after install, run:
|
|
336
|
+
|
|
337
|
+
```bash
|
|
338
|
+
npx cc-safe-setup --doctor
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
This detects Windows backslash paths (`C:\Users\...` → `C:/Users/...`) and missing execute permissions.
|
|
342
|
+
|
|
343
|
+
See [Issue #1](https://github.com/yurukusa/cc-safe-setup/issues/1) for details.
|
|
344
|
+
|
|
331
345
|
## Troubleshooting
|
|
332
346
|
|
|
333
347
|
**[TROUBLESHOOTING.md](TROUBLESHOOTING.md)** — "Hook doesn't work" → step-by-step diagnosis. Covers every common failure pattern.
|
package/index.mjs
CHANGED
|
@@ -754,6 +754,31 @@ async function audit() {
|
|
|
754
754
|
});
|
|
755
755
|
}
|
|
756
756
|
|
|
757
|
+
// 10. Check for Windows backslash paths in hook commands
|
|
758
|
+
const allCmds = [...preHooks, ...postHooks, ...stopHooks]
|
|
759
|
+
.flatMap(e => (e.hooks || []).map(h => h.command || ''));
|
|
760
|
+
const backslashCmds = allCmds.filter(c => c.includes('\\'));
|
|
761
|
+
if (backslashCmds.length > 0) {
|
|
762
|
+
risks.push({
|
|
763
|
+
severity: 'CRITICAL',
|
|
764
|
+
issue: `${backslashCmds.length} hook command(s) have Windows backslash paths — hooks will fail with "No such file"`,
|
|
765
|
+
fix: 'npx cc-safe-setup --uninstall && npx cc-safe-setup@latest'
|
|
766
|
+
});
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
// 11. Check for hook permission fixer (SessionStart)
|
|
770
|
+
const sessionHooks = settings.hooks?.SessionStart || [];
|
|
771
|
+
const hasPermFixer = sessionHooks.some(e =>
|
|
772
|
+
(e.hooks || []).some(h => (h.command || '').includes('permission'))
|
|
773
|
+
);
|
|
774
|
+
if (!hasPermFixer && process.platform === 'win32') {
|
|
775
|
+
risks.push({
|
|
776
|
+
severity: 'LOW',
|
|
777
|
+
issue: 'No SessionStart permission fixer — plugin updates may break hook permissions on Windows',
|
|
778
|
+
fix: 'npx cc-safe-setup --install-example hook-permission-fixer'
|
|
779
|
+
});
|
|
780
|
+
}
|
|
781
|
+
|
|
757
782
|
// Display results
|
|
758
783
|
if (good.length > 0) {
|
|
759
784
|
console.log(c.bold + ' ✓ What\'s working:' + c.reset);
|
package/package.json
CHANGED