mirror of
https://github.com/garrytan/gbrain.git
synced 2026-07-27 22:15:33 +00:00
The help text (gbrain check-backlinks <check|fix> [dir]) promised a positional directory argument, but runBacklinks only parsed --dir and defaulted to cwd, so the walker ran from the wrong root and could hit EPERM on unreadable sibling dirs. Extract parseBacklinksArgs: positional [dir] is now honored, --dir still overrides it, --dry-run preserved, and a --dir flag missing its value falls back to the positional dir instead of picking up undefined. Takeover of #852 (rebased onto master past the findBacklinkGaps dedupe test block). Fixes #485. Co-authored-by: Kage18 <Kage18@users.noreply.github.com> Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>