Skip to content

Commit 03e6da7

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

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/specify_cli/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2868,6 +2868,12 @@ def extension_update(
28682868
if extension_dir.exists():
28692869
shutil.rmtree(extension_dir)
28702870
shutil.copytree(backup_ext_dir, extension_dir)
2871+
else:
2872+
# If there was no backup directory, the original state may have
2873+
# been "no extension directory". In that case, ensure we don't
2874+
# leave a newly created (and now failed) extension_dir behind.
2875+
if extension_dir.exists():
2876+
shutil.rmtree(extension_dir)
28712877

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

0 commit comments

Comments
 (0)