Skip to content

Commit

Permalink
Don't use "porcupine-venv" venv
Browse files Browse the repository at this point in the history
Fixes  Akuli#1456.
  • Loading branch information
ethical-haquer committed Apr 1, 2024
1 parent 0f8b554 commit 8835051
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions porcupine/plugins/python_venv.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@


def is_venv(path: Path) -> bool:
if not "porcupine-venv" in str(path):
print(f"{path} is valid venv")
if path.name != "porcupine-venv":
landmarks = [path / "pyvenv.cfg"]
if sys.platform == "win32":
landmarks.append(path / "Scripts" / "python.exe")
Expand All @@ -33,6 +32,7 @@ def is_venv(path: Path) -> bool:
return all(landmark.exists() for landmark in landmarks)
else:
log.info(f"not using venv: '{path}', as it contains 'porcupine-venv'")
return False


def _find_venv(project_root: Path) -> Path | None:
Expand Down

0 comments on commit 8835051

Please sign in to comment.