Skip to content

CLI --out failure dumps a raw traceback #12

Description

@royalpinto007

Problem

--out /nonexistent-dir/out.json throws a raw ENOENT stack, unlike the guarded read path.

Where

bin/tokencut.mjs (writeFileSync with no try/catch).

Acceptance

Add a failing test first running --compact --out <missing-dir>/f.json, expecting a non-zero exit with a one-line could not write stderr and no stack. Then fix.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions