Skip to content

Commit ca06ccb

Browse files
mbachorikCopilot
andauthored
Update src/specify_cli/__init__.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent cc61b4a commit ca06ccb

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/specify_cli/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2867,6 +2867,11 @@ def extension_update(
28672867
if extension_dir.exists():
28682868
shutil.rmtree(extension_dir)
28692869
shutil.copytree(backup_ext_dir, extension_dir)
2870+
else:
2871+
# If no backup exists but an extension directory was created
2872+
# during the failed update, remove it to fully revert state.
2873+
if extension_dir.exists():
2874+
shutil.rmtree(extension_dir)
28702875

28712876
# Remove any NEW command files created by failed install
28722877
# (files that weren't in the original backup)

0 commit comments

Comments
 (0)