Skip to content

feat: return non-zero exit code on activation errors#378

Open
jfroche wants to merge 2 commits intomainfrom
fix/final-exit-code
Open

feat: return non-zero exit code on activation errors#378
jfroche wants to merge 2 commits intomainfrom
fix/final-exit-code

Conversation

@jfroche
Copy link
Member

@jfroche jfroche commented Feb 27, 2026

Use lazy_errors to accumulate errors during activation and return a non-zero exit code if any errors were encountered, while still applying as many changes as possible.

We also disable the nix module by default to avoid issues with existing nix configuration file. It is possible to enable it again by setting nix.enable to true and
it will replace the existing /etc/nix/nix.conf file with the one generated by nix module.

@jfroche jfroche force-pushed the fix/final-exit-code branch 2 times, most recently from c17ab02 to ea4f13e Compare March 4, 2026 15:17
@picnoir picnoir self-assigned this Mar 5, 2026
jfroche added 2 commits March 6, 2026 14:29
Enabling nix by default force users to configure nix.settings to keep
their previous configuration, which is not ideal. 

This commit disables nix by default and adds a test to ensure that enabling nix works correctly and that the nix.conf file is properly managed.
Use lazy_errors to accumulate errors during activation and return a
non-zero exit code if any errors were encountered, while still applying
as many changes as possible.
@jfroche jfroche force-pushed the fix/final-exit-code branch from ea4f13e to d189d6f Compare March 6, 2026 13:29
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.

2 participants