Skip to content

Safeguard file tree deletes #33

Open
@t-paul

Description

@t-paul

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.")

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions