Skip to content

Commit 6e4bc5a

Browse files
committed
Properly normalize virtualenv path setting.
1 parent d99d2e5 commit 6e4bc5a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

python/scriptingprovider.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1363,8 +1363,9 @@ def _install_modules(self, ctx, _modules: bytes) -> bool:
13631363

13641364
args.extend(["install", "--upgrade", "--upgrade-strategy", "only-if-needed"])
13651365
venv = settings.Settings().get_string("python.virtualenv")
1366+
venv_path = Path(os.path.normpath(venv)) if venv is not None else None
13661367
in_virtual_env = 'VIRTUAL_ENV' in os.environ
1367-
if venv is not None and venv.endswith("site-packages") and Path(venv).is_dir() and not in_virtual_env:
1368+
if venv_path is not None and venv_path.name == "site-packages" and venv_path.is_dir() and not in_virtual_env:
13681369
args.extend(["--target", venv])
13691370
else:
13701371
user_dir = binaryninja.user_directory()

0 commit comments

Comments
 (0)