Skip to content

Commit e8d8f76

Browse files
committed
fix: check that sys.executable is valid before env creation
1 parent 206447f commit e8d8f76

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

install-poetry.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,11 @@ def bin_path(self):
293293

294294
@classmethod
295295
def make(cls, target: Path) -> "VirtualEnvironment":
296+
if not sys.executable:
297+
raise ValueError(
298+
"Unable to determine sys.executable. Set PATH to a sane value or set it explicitly with PYTHONEXECUTABLE."
299+
)
300+
296301
try:
297302
# on some linux distributions (eg: debian), the distribution provided python
298303
# installation might not include ensurepip, causing the venv module to

0 commit comments

Comments
 (0)