Skip to content

Conversation

@abrookins
Copy link
Collaborator

Summary

Fixes #682 - Migrator CLI tool does not work properly when using pyenv virtualenv.

The import_submodules() function now adds os.getcwd() to sys.path before attempting to import the root module. This ensures that modules can be found when using pyenv or similar tools where Python binaries are stored outside the project directory.

Changes

  • Added sys.path.insert(0, os.getcwd()) at the beginning of import_submodules() in legacy_migrator.py
  • Added check to avoid duplicate entries in sys.path
  • Updated docstring to explain the purpose of this addition

abrookins and others added 2 commits January 23, 2026 11:56
Add sys.path.insert(0, os.getcwd()) to import_submodules() so that
modules can be found when using pyenv or similar tools where Python
binaries are stored outside the project directory.

Fixes #682
@abrookins abrookins merged commit 57b673c into main Jan 23, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrator CLI tool does not work properly when using pyenv virtualenv

2 participants