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

Safeguard file tree deletes #33

Open
t-paul opened this issue Aug 18, 2024 · 0 comments · Fixed by #36
Open

Safeguard file tree deletes #33

t-paul opened this issue Aug 18, 2024 · 0 comments · Fixed by #36
Assignees

Comments

@t-paul
Copy link
Member

t-paul commented Aug 18, 2024

install_manager.remove() should ensure we are inside the library folder before calling rmtree().

def remove(name: str, missing_ok: bool = True):
if local_lib := local_index.get(name, default=None):
rmtree(local_lib.location)
local_index.remove(name)
elif not missing_ok:
raise Exception(f"Library {name} not found.")

@jackoat29 jackoat29 self-assigned this Aug 22, 2024
@jackoat29 jackoat29 linked a pull request Aug 22, 2024 that will close this issue
@t-paul t-paul reopened this Aug 28, 2024
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 a pull request may close this issue.

2 participants