Skip to content

Commit

Permalink
Improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Ovidiu Rusu committed Jan 3, 2025
1 parent fca9911 commit 6466099
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sema4ai/src/sema4ai_code/robocorp_language_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -2271,6 +2271,10 @@ def _fix_wrong_agent_import(self, agent_dir, monitor: IMonitor) -> ActionResultD

try:
for zip_path in actions_dir.rglob("*.zip"):
# Check if a package.yaml exists in the same directory as the zip file then skip
if (zip_path.parent / "package.yaml").exists():
continue

had_zips = True
zip_folder_name = zip_path.name.replace(".zip", "")
temp_extract_path = zip_path.parent / zip_folder_name
Expand All @@ -2280,7 +2284,7 @@ def _fix_wrong_agent_import(self, agent_dir, monitor: IMonitor) -> ActionResultD

# Move files and directories from the versioned folder to the root action directory
for item in temp_extract_path.rglob("*"):
if item.is_file():
if item.is_file() and item.name != "metadata.json":
relative_path = item.relative_to(temp_extract_path)
final_path = zip_path.parent / relative_path

Expand Down

0 comments on commit 6466099

Please sign in to comment.