Skip to content

fix(config): handle empty YAML config files with decoder#79

Merged
sgaunet merged 1 commit intomainfrom
fix/config-handle-empty-yaml-files
Mar 20, 2026
Merged

fix(config): handle empty YAML config files with decoder#79
sgaunet merged 1 commit intomainfrom
fix/config-handle-empty-yaml-files

Conversation

@sgaunet
Copy link
Copy Markdown
Owner

@sgaunet sgaunet commented Mar 20, 2026

yaml.NewDecoder.Decode returns io.EOF for empty input unlike
yaml.Unmarshal which returns nil. Treat io.EOF as valid (use defaults).

Closes #78

yaml.NewDecoder.Decode returns io.EOF for empty input unlike
yaml.Unmarshal which returns nil. Treat io.EOF as valid (use defaults).

Closes #78
@sgaunet sgaunet self-assigned this Mar 20, 2026
@sgaunet sgaunet added bug Something isn't working validation labels Mar 20, 2026
@sgaunet sgaunet merged commit 5501b69 into main Mar 20, 2026
2 checks passed
@sgaunet sgaunet deleted the fix/config-handle-empty-yaml-files branch March 20, 2026 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working validation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Empty YAML config files fail with EOF error

1 participant