Skip to content

Fix dependency installation cleanup#90

Open
Nightriff wants to merge 4 commits into
task/update-copyright-yearfrom
fix/dependency-installation-cleanup
Open

Fix dependency installation cleanup#90
Nightriff wants to merge 4 commits into
task/update-copyright-yearfrom
fix/dependency-installation-cleanup

Conversation

@Nightriff

@Nightriff Nightriff commented May 28, 2025

Copy link
Copy Markdown
Contributor

If dependency installation fails, the add-on attempts to clean up any partially installed dependencies folder. The add-on uses presence of this folder at startup to know if dependencies are already installed or not, so it's important this folder gets cleaned up for erroneous installations.

However, it currently uses rmdir, which only works for empty directories. This PR switches to shutil.rmtree, which works to delete folders with files in them too. This should make the cleanup process more reliable during failed installations.

Additionally, if it does somehow get into a bad state, this PR also adds a "Reinstall dependencies" button to the addon preferences for troubleshooting purposes. This button in addon preferences is always available to click, whereas previously users could only see the installation button if the add-on detected there was no public dependencies folder.

Fixes #42 and hopefully fixes #75 (at the very least, it adds a button to allow anyone to reinstall the dependencies if there is a problem, which indirectly fixes it)

Nightriff added 3 commits May 28, 2025 16:45
…rs with files in them. This should make the cleanup process more reliable for failed installations.
@Nightriff Nightriff self-assigned this May 28, 2025
@Nightriff Nightriff added the bug Something isn't working label May 28, 2025
…-blender-plugin into fix/dependency-installation-cleanup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant