Skip to content

Let an explicit output flag override an invalid output default - #71

Open
puncsky wants to merge 1 commit into
render-oss:mainfrom
puncsky:fix/honor-explicit-output-format-20261029
Open

puncsky wants to merge 1 commit into
render-oss:mainfrom
puncsky:fix/honor-explicit-output-format-20261029

Conversation

@puncsky

@puncsky puncsky commented Oct 30, 2026

Copy link
Copy Markdown

Summary

Skip runtime output-default detection when the command already has an explicit output flag. Continue validating the selected default when no flag is given.

Motivation

A typo in an unused RENDER_OUTPUT value currently aborts commands even with a valid --output json/yaml/text override.

How to verify

go test ./cmd/... ./pkg/... ./internal/...
  • All 57 development packages pass on the candidate.
  • Root-command tests use the real detector and fake API: valid explicit formats succeed despite an invalid environment default, while a selected invalid default or invalid explicit format still fails before requests.
  • 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

An explicit output flag takes precedence over an invalid unused RENDER_OUTPUT default.

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