Skip to content

Preserve StringArray flag values without a CSV round trip - #62

Open
puncsky wants to merge 1 commit into
render-oss:mainfrom
puncsky:fix/preserve-stringarray-values-20261029
Open

puncsky wants to merge 1 commit into
render-oss:mainfrom
puncsky:fix/preserve-stringarray-values-20261029

Conversation

@puncsky

@puncsky puncsky commented Oct 30, 2026

Copy link
Copy Markdown

Summary

Read StringArray values through pflag.SliceValue instead of its CSV-based getter. StringSlice and enum handling remain unchanged.

Motivation

The getter changes interior CRLF to LF and drops explicitly empty arguments. Reading the stored array preserves accepted values and lets existing validators handle explicit empty inputs.

How to verify

go test ./cmd/... ./pkg/... ./internal/...
  • All 57 development packages pass on the candidate.
  • Parser tests cover CRLF, LF, lone CR, tabs, commas, quotes, explicit empty arguments, valid K= values and unset arrays. An explicit --env-var= or --secret-file= now reaches its existing validation instead of disappearing.
  • New-code lint is clean against c31e586e; full lint on unmodified main reports 92 pre-existing findings with the pinned golangci-lint v2.14.0.

Release notes

Repeated StringArray flags preserve literal values, including CRLF and explicit empty arguments.

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