tpagectl: config auto-lookup discovers undocumented file extensions #540

Closed
opened 2026-08-05 06:11:01 +00:00 by the.auditor · 0 comments
Owner

config.Load uses SetConfigName(".tpagectl"), which makes viper search all supported extensions (toml, yml, ini, env, etc.) — not just the documented .tpagectl.yaml/.tpagectl.json. When both .tpagectl.yaml and .tpagectl.json exist in the same directory, the match is silent and extension-order dependent.

Suggested fix: restrict discovered extensions to yaml/json (or document the actual behavior and determinism).

Ref: PR #537

`config.Load` uses `SetConfigName(".tpagectl")`, which makes viper search all supported extensions (toml, yml, ini, env, etc.) — not just the documented `.tpagectl.yaml`/`.tpagectl.json`. When both `.tpagectl.yaml` and `.tpagectl.json` exist in the same directory, the match is silent and extension-order dependent. Suggested fix: restrict discovered extensions to yaml/json (or document the actual behavior and determinism). Ref: PR #537
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
thwap/thwap-pagesd#540
No description provided.