Skip to content

fix(pstack): support dash-prefixed decision logs - #845

Open
rudycelekli wants to merge 1 commit into
cursor:mainfrom
rudycelekli:fix/show-work-dash-log-path-20261024
Open

rudycelekli wants to merge 1 commit into
cursor:mainfrom
rudycelekli:fix/show-work-dash-log-path-20261024

Conversation

@rudycelekli

@rudycelekli rudycelekli commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

log.sh passed a dash-prefixed logfile name directly to dirname. BSD dirname interpreted it as an option, so a valid relative logfile such as -decisions.tsv could not be written.

The script now terminates dirname option parsing with --, while preserving existing directory creation and append behavior. The generated harness copy and a shell regression test are included.

Validation: base exits with dirname: illegal option -- d for -decisions.tsv; the fixed regression test writes the header and row successfully. Plugin validation, harness generation check, and whitespace checks pass.


Note

Low Risk
Single defensive dirname change plus a shell regression test; no auth, data, or API surface impact.

Overview
Fixes decision logging when the log path starts with - (e.g. -decisions.tsv), which previously failed on BSD dirname because the name was parsed as a flag.

log.sh now uses dirname -- "$logfile" so option parsing stops before the path. Directory creation and TSV append behavior are unchanged.

Adds log.test.sh, a small regression that writes through log.sh with -decisions.tsv and checks the file exists with header plus one data row (two lines).

Reviewed by Cursor Bugbot for commit d1b940b. Bugbot is set up for automated code reviews on this repo. Configure here.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant