Merge branch 'developing' into bot_manager
This commit is contained in:
commit
90885bea2a
@ -474,7 +474,15 @@ def _extract_skills_to_robot(bot_id: str, skills: List[str], project_path: Path)
|
||||
continue
|
||||
|
||||
try:
|
||||
shutil.copytree(source_dir, target_dir, dirs_exist_ok=True)
|
||||
# Fully replace the target skill directory so stale files (renamed/removed
|
||||
# in source) and __pycache__ do not linger and break imports.
|
||||
if target_dir.exists():
|
||||
shutil.rmtree(target_dir)
|
||||
shutil.copytree(
|
||||
source_dir,
|
||||
target_dir,
|
||||
ignore=shutil.ignore_patterns("__pycache__", "*.pyc"),
|
||||
)
|
||||
logger.info(f" Synced: {source_dir} -> {target_dir}")
|
||||
except Exception as e:
|
||||
logger.error(f" Failed to copy {source_dir}: {e}")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user