Skip to content

hooks/ponytail-runtime.js: setMode has no try/catch — disk full crashes hook #378

Description

@nanaubusiness

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions