Skip to content

fix: Handle netcore/netfx folders in CLI runner path resolution#2538

Merged
jmcouffin merged 3 commits intodevelopfrom
fix/cli-runner-paths-9680
Jan 24, 2025
Merged

fix: Handle netcore/netfx folders in CLI runner path resolution#2538
jmcouffin merged 3 commits intodevelopfrom
fix/cli-runner-paths-9680

Conversation

@devloai
Copy link
Copy Markdown
Contributor

@devloai devloai bot commented Jan 24, 2025

Fixes #2537

Description

This PR fixes the pyrevit run CLI command that was failing with ImportError: No module named pyrevit by properly handling the new netcore and netfx runtime folders in path resolution.

Changes

  • Updated GetDeployPath() in PyRevitRunnerCommand.cs to handle new runtime folder structure
  • Added support for both netcore and netfx runtime folders
  • Maintained backward compatibility with existing deployments
  • Added unit tests for path resolution logic

Testing

  • Added comprehensive unit tests covering the path resolution logic
  • Tests verify correct handling of both old and new folder structures
  • Manual testing recommended in real environment with pyRevit installed

Notes

  • This eliminates the need for manual path additions in scripts as mentioned in the workaround
  • Works across all supported Revit versions (2020-2025)
  • Changes are minimal and targeted to path resolution logic only

- Updated GetDeployPath() to handle new runtime folder structure
- Added support for both netcore and netfx runtime folders
- Maintained backward compatibility
- Added unit tests for path resolution logic

Fixes #2537
@devloai devloai bot mentioned this pull request Jan 24, 2025
5 tasks
@jmcouffin jmcouffin requested a review from thumDer January 24, 2025 09:46
@jmcouffin jmcouffin added Bug Bug that stops user from using the tool or a major portion of pyRevit functionality [class] Engines Issues related to pyRevit execution engines [subsystem] labels Jan 24, 2025
@jmcouffin jmcouffin merged commit 7ee88d8 into develop Jan 24, 2025
@jmcouffin jmcouffin deleted the fix/cli-runner-paths-9680 branch January 24, 2025 19:53
@github-actions
Copy link
Copy Markdown
Contributor

📦 New work-in-progress (wip) builds are available for 5.0.0.25024+1957-wip

@github-actions
Copy link
Copy Markdown
Contributor

📦 New work-in-progress (wip) builds are available for 5.0.0.25025+1310-wip

@github-actions
Copy link
Copy Markdown
Contributor

📦 New work-in-progress (wip) builds are available for 5.0.0.25030+1056-wip

@github-actions
Copy link
Copy Markdown
Contributor

📦 New work-in-progress (wip) builds are available for 5.0.0.25030+1130-wip

@github-actions
Copy link
Copy Markdown
Contributor

📦 New work-in-progress (wip) builds are available for 5.0.0.25030+1138-wip

@github-actions
Copy link
Copy Markdown
Contributor

📦 New work-in-progress (wip) builds are available for 5.0.0.25031+1700-wip

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 1, 2025

📦 New work-in-progress (wip) builds are available for 5.0.0.25032+1615-wip

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 1, 2025

📦 New work-in-progress (wip) builds are available for 5.0.0.25032+1635-wip

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 1, 2025

📦 New work-in-progress (wip) builds are available for 5.0.0.25032+1841-wip

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 2, 2025

📦 New work-in-progress (wip) builds are available for 5.0.0.25033+1337-wip

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 2, 2025

📦 New work-in-progress (wip) builds are available for 5.0.0.25033+1402-wip

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 3, 2025

📦 New work-in-progress (wip) builds are available for 5.0.0.25034+1241-wip

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 3, 2025

📦 New work-in-progress (wip) builds are available for 5.0.0.25034+1511-wip

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 3, 2025

📦 New public release are available for 5.0.0.24174+2300

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Bug that stops user from using the tool or a major portion of pyRevit functionality [class] Engines Issues related to pyRevit execution engines [subsystem]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: pyrevit cli runner breaks

2 participants