8000 nixconf: fix handling of optional `!include` statements by sandydoo · Pull Request #694 · cachix/cachix · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

nixconf: fix handling of optional !include statements #694

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 28, 2025
Merged

Conversation

sandydoo
Copy link
Member
@sandydoo sandydoo commented May 27, 2025

Optional includes would throw an error if the file was missing.

The issue was that the check handling missing/required files did not
implement all of the branches correctly.

64febd2 - fixes the logic and adds a test case.
03e9576 - dedupes the parsing and error handling logic.

Fixes #693.

@sandydoo sandydoo added the bug Something isn't working label May 27, 2025
sandydoo added 2 commits May 27, 2025 17:43
Optional includes would throw an error if the file was missing.

The issue was that the check handling missing/required files did not
implement all of the branches correctly.

Instead of first checking the file and then reading it, we now read the
file and handle the errors after the fact. This makes the logic easier
to understand at a glance.
@sandydoo sandydoo merged commit c86616c into master May 28, 2025
10 checks passed
@sandydoo sandydoo deleted the fix-693 branch May 28, 2025 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Optional include parsing in nix.conf is not working as expected
1 participant
0