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

Backport v2 privilege elevation logic to v1 #260

Merged
merged 5 commits into from
Oct 17, 2024

Conversation

marcoesters
Copy link
Contributor

@marcoesters marcoesters commented Oct 9, 2024

Description

The current menuinst legacy implementation does not work with conda-standalone. Trying to run conda.exe remove -p <prefix> --all will cause an error where menuinst cannot find the python binary. This happens when menuinst is trying to elevate privileges because it only looks for .nonadmin files in the root_prefix.

This PR backports some of the menuinst v2 logic to be more robust for conda-standalone. Note that I decided to not use the needs_admin function because it makes additional assumptions. Specifically, it returns False if the user is already admin, which is not consistent with menuinst v1 behavior.

Checklist - did you ...

  • Add a file to the news directory (using the template) for the next release's release notes?
  • Add / update necessary tests?
  • Add / update outdated documentation?

@conda-bot conda-bot added the cla-signed [bot] added once the contributor has signed the CLA label Oct 9, 2024
@marcoesters marcoesters marked this pull request as ready for review October 9, 2024 20:59
@marcoesters marcoesters requested a review from a team as a code owner October 9, 2024 20:59
@marcoesters marcoesters enabled auto-merge (squash) October 17, 2024 17:09
@marcoesters marcoesters merged commit 993b9ea into conda:main Oct 17, 2024
16 checks passed
@marcoesters marcoesters deleted the backport-v2-to-v1 branch October 17, 2024 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed [bot] added once the contributor has signed the CLA
Projects
Status: 🏁 Done
Development

Successfully merging this pull request may close these issues.

3 participants