In hooks/ponytail-runtime.js lines 15-18:
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.
In
hooks/ponytail-runtime.jslines 15-18: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.