fix(#442): --config-dir= no longer truncates paths containing equals signs (#475)

Extract a pure `parseConfigDirFromArgs(argsArray)` seam from the
closure-based `parseConfigDirArg()` and fix the equals-form parser to
use `slice(indexOf('=') + 1)` instead of `split('=')[1]`, so that
paths like `/tmp/gsd=a` or `/tmp/a=b=c` are preserved in full.

Both `--config-dir=<path>` and `-c=<path>` are fixed.  The pure seam
is exported via `module.exports` so the 12-case unit test can assert
on typed return values without spawning a child process.

Co-authored-by: CI Rebase Check <ci@gsd-redux>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Tom Boucher
2026-05-29 17:12:50 -04:00
committed by GitHub
parent 6687087627
commit d7dafafd03
3 changed files with 139 additions and 15 deletions

View File

@@ -0,0 +1,5 @@
---
type: Fixed
pr: 475
---
**`--config-dir=<path>` no longer truncates paths containing `=`** — the equals-form parser now splits on the first `=` only.