Skip to content

Commit cc78327

Browse files
authored
remove old tl-install
1 parent f92fbda commit cc78327

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

platform.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -269,21 +269,22 @@ def _install_tl_install(self, version: str) -> bool:
269269
if os.path.exists(tl_install_path):
270270
logger.info(f"Removing old {tl_install_name} installation")
271271
safe_remove_directory(tl_install_path)
272-
273-
# Remove versioned directories as well
274-
safe_remove_directory_pattern(self.packages_dir, f"{tl_install_name}@*")
275-
safe_remove_directory_pattern(self.packages_dir, f"{tl_install_name}.*")
276-
272+
273+
# Remove maybe old existing version of tl-install too
274+
old_tl_install_path = os.path.join(self.packages_dir, "tl-install")
275+
if os.path.exists(old_tl_install_path):
276+
safe_remove_directory(old_tl_install_path)
277+
277278
# Install new version
278279
logger.info(f"Installing {tl_install_name} version {version}")
279-
280+
280281
# Set package configuration
281282
self.packages[tl_install_name]["optional"] = False
282283
self.packages[tl_install_name]["version"] = version
283-
284+
284285
# Install via package manager
285286
pm.install(version)
286-
287+
287288
# Verify installation
288289
if os.path.exists(os.path.join(tl_install_path, "package.json")):
289290
logger.info(f"{tl_install_name} successfully installed and verified")

0 commit comments

Comments
 (0)