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

Refactor Context + Make search path dependent on sudoers file #991

Merged
merged 5 commits into from
Feb 12, 2025

Conversation

squell
Copy link
Member

@squell squell commented Feb 10, 2025

Dependent on #897

Closes #989
Closes #986

There is some duplication in context.rs, but that is essentially the duplication that was already there in the From<> impl's that were previously there (whose only job was converting the nicely seperate CLI objects into a intermediate object that was then converted to the "Context" object.

This PR doesn't get rid of the Context object but does make it shorter-lived: it only exists in the pipeline now where we can maybe chip away at it more. Also, it doesn't really fix the issue that Context is a "one size fits all" object that doesn't really get fully used in every circumstance.

It probably is blasphemous to say this but this is one of the areas where I feel having structural inheritance can be a nice thing. :-)

@squell squell marked this pull request as draft February 10, 2025 20:53
@squell squell force-pushed the refactor-context branch 2 times, most recently from a34141a to e2717e8 Compare February 11, 2025 11:36
@squell squell marked this pull request as ready for review February 11, 2025 11:37
@squell squell force-pushed the refactor-context branch 3 times, most recently from cd9bea4 to 9c40e21 Compare February 11, 2025 11:50
@squell squell enabled auto-merge February 11, 2025 15:02
@bjorn3
Copy link
Collaborator

bjorn3 commented Feb 12, 2025

Opened #996 for the spurious test failure.

@squell squell merged commit ec8c84c into main Feb 12, 2025
14 checks passed
@squell squell deleted the refactor-context branch February 12, 2025 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants