-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Description
-
I am on the latest Poetry version.
-
I have searched the issues of this repo and believe that this is not a duplicate.
-
If an exception occurs when executing a command, I executed it again in debug mode (
-vvvoption). -
OS version and name: Linux (Ubuntu 20.04)
-
Poetry version: 1.2.0b2
-
Link of a Gist with the contents of your pyproject.toml file: https://gist.github.com/mlegner/39a29fa3d3678a8aedcde45d215e2897
Issue
When creating a new virtualenv via poetry env use python or poetry add someproject for a project with an empty name, it fails with the following output:
$ poetry env use python
Creating virtualenv -6WcazSRI-py3.8 in /home/markus/.cache/pypoetry/virtualenvs
usage: virtualenv [--version] [--with-traceback] [-v | -q] [--read-only-app-data] [--app-data APP_DATA] [--reset-app-data] [--upgrade-embed-wheels] [--discovery {builtin}] [-p py] [--try-first-with py_exe]
[--creator {builtin,cpython3-posix,venv}] [--seeder {app-data,pip}] [--no-seed] [--activators comma_sep_list] [--clear] [--no-vcs-ignore] [--system-site-packages] [--symlinks | --copies] [--no-download | --download]
[--extra-search-dir d [d ...]] [--pip version] [--setuptools version] [--wheel version] [--no-pip] [--no-setuptools] [--no-wheel] [--no-periodic-update] [--symlink-app-data] [--prompt prompt] [-h]
dest
virtualenv: error: argument --prompt: expected one argumentThe root of the problem is the virtualenvs.prompt option added in #5606: The standard value there, {project_name}-py{python_version} expands to something like -py3.8 for a project with empty name, which is interpreted as an option in the call to virtualenv instead of the value of --prompt.
I suggest to either add a check for an empty name or add quotes for the call to virtualenv.