Skip to content

Commit 051c6e3

Browse files
authored
clean cache for .tox (#41689)
1 parent 824cc36 commit 051c6e3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tools/azure-sdk-tools/packaging_tools/package_utils.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import os
22
import ast
33
import time
4-
import importlib
4+
import shutil
55
from typing import Optional, Tuple, Dict, Any, List
66
from pathlib import Path
77
import logging
@@ -82,6 +82,10 @@ def change_log_generate(
8282
# try new changelog tool
8383
if prefolder and not is_multiapi:
8484
try:
85+
tox_cache_path = Path(prefolder, package_name, ".tox")
86+
if tox_cache_path.exists():
87+
_LOGGER.info(f"Remove {tox_cache_path} to avoid potential tox cache conflict")
88+
shutil.rmtree(tox_cache_path)
8589
return change_log_new(str(Path(prefolder) / package_name), not (last_stable_release and tag_is_stable))
8690
except Exception as e:
8791
_LOGGER.warning(f"Failed to generate changelog with breaking_change_detector: {e}")

0 commit comments

Comments
 (0)