Skip to content
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

Return with exit code when --ask is not accepted #146

Merged
merged 2 commits into from
Aug 26, 2024

Conversation

Jeidnx
Copy link
Contributor

@Jeidnx Jeidnx commented Aug 17, 2024

This change exits the program with code 1 when the user rejects changing to the new configuration. The motivation behind this change is to make it easier to wrap this program in scripts.

As i have written in the code, i wanted to propagate the error properly but with color_eyre this doesn't seem to be an option.

I was also a bit confused what drop(out_dir) was doing there and couldn't understand the comment, so i changed it to something more clear.

@Jeidnx Jeidnx force-pushed the exit_code branch 3 times, most recently from bab871d to 07d05b7 Compare August 25, 2024 19:09
src/nixos.rs Outdated Show resolved Hide resolved
@Jeidnx
Copy link
Contributor Author

Jeidnx commented Aug 26, 2024

I've made the requested change and also split the changes into two commits.

@viperML
Copy link
Owner

viperML commented Aug 26, 2024

Can you apply the same src/home.rs and src/clean.rs? Then it should be ready

@Jeidnx
Copy link
Contributor Author

Jeidnx commented Aug 26, 2024

Of course, done

@viperML viperML merged commit a922ead into viperML:master Aug 26, 2024
1 check passed
@Jeidnx Jeidnx deleted the exit_code branch August 27, 2024 09:52
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