Poetry: `poetry run` behaves incorrectly

Created on 17 Nov 2018  路  3Comments  路  Source: python-poetry/poetry

  • [x] I am on the latest Poetry version.
  • [x] I have searched the issues of this repo and believe that this is not a duplicate.
  • [x] If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).
  • OS version and name: macos 10.14.1
  • Poetry version: 0.12.8

Issue

poetry behaves incorrectly when I try to run poetry run whatever_command. There are different usecases I want to show.

Just getting the help

禄 poetry run --help

[FileNotFoundError]
[Errno 2] No such file or directory: '/Users/sobolev/Documents/github/wemake-djang
o-template/.venv/bin/--help': '/Users/sobolev/Documents/github/wemake-django-templ
ate/.venv/bin/--help'

run <args> (<args>)...

The same with debug mode:

禄 poetry run --help -vvv

[FileNotFoundError]
[Errno 2] No such file or directory: '/Users/sobolev/Documents/github/wemake-djang
o-template/.venv/bin/--help': '/Users/sobolev/Documents/github/wemake-django-templ
ate/.venv/bin/--help'

run <args> (<args>)...

Getting python location

Now let's move to shell commands:

禄 poetry run which python

[FileNotFoundError]
[Errno 2] No such file or directory: '/Users/sobolev/Documents/github/wemake-djang
o-template/.venv/bin/which': '/Users/sobolev/Documents/github/wemake-django-templa
te/.venv/bin/which'

run <args> (<args>)...

Executing python binaries

This is working fine:

禄 poetry run python --version
Python 3.6.6
禄 poetry run pytest --version
This is pytest version 4.0.0, imported from /Users/sobolev/Documents/github/wemake-django-template/.venv/lib/python3.6/site-packages/pytest.py
setuptools registered plugins:
  pytest-randomly-1.2.3 at /Users/sobolev/Documents/github/wemake-django-template/.venv/lib/python3.6/site-packages/pytest_randomly.py
  pytest-isort-0.2.1 at /Users/sobolev/Documents/github/wemake-django-template/.venv/lib/python3.6/site-packages/pytest_isort.py
  pytest-flake8-1.0.2 at /Users/sobolev/Documents/github/wemake-django-template/.venv/lib/python3.6/site-packages/pytest_flake8.py
  pytest-cookies-0.3.0 at /Users/sobolev/Documents/github/wemake-django-template/.venv/lib/python3.6/site-packages/pytest_cookies.py

Installation details

poetry is installed via curl. Here are my PATH and which poetry:

禄 echo $PATH | grep poetry
/Users/sobolev/.pyenv/shims:/Users/sobolev/.local/bin:/usr/local/opt/python2/libexec/bin:/usr/local/opt/gpg-agent/bin:/usr/local/sbin:/usr/local/share/npm/bin:/usr/local/opt/php56/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:**/Users/sobolev/.poetry/bin**:/usr/local/opt/fzf/bin
禄 which poetry
/Users/sobolev/.poetry/bin/poetry
stale

Most helpful comment

There was a regression in 0.12.8. This is already fixed on master and I will make a new bugfix release on Monday.

All 3 comments

There was a regression in 0.12.8. This is already fixed on master and I will make a new bugfix release on Monday.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Closing this issue automatically because it has not had any activity since it has been marked as stale. If you think it is still relevant and should be addressed, feel free to open a new one.

Was this page helpful?
0 / 5 - 0 ratings