Repository navigation
fix(pstack): support dash-prefixed decision logs - #845
Open
rudycelekli wants to merge 1 commit into
Open
rudycelekli wants to merge 1 commit into
rudycelekli wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
log.shpassed a dash-prefixed logfile name directly todirname. BSDdirnameinterpreted it as an option, so a valid relative logfile such as-decisions.tsvcould not be written.The script now terminates
dirnameoption 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 -- dfor-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
dirnamechange 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 BSDdirnamebecause the name was parsed as a flag.log.shnow usesdirname -- "$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 throughlog.shwith-decisions.tsvand 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.