hooks/ponytail-runtime.js: setMode has no try/catch — disk full crashes hook
In `hooks/ponytail-runtime.js` lines 15-18:
```javascript
function setMode(mode) {
fs.mkdirSync(path.dirname(statePath), { recursive: true });
fs.writeFileSync(statePath, mode);
}
```
No try/catch. If disk is full, permissions are wrong, or path is invalid, this throws and crashes the hook. Should gracefully degrade instead of propagating a crash.
2 条评论