Abortion of poetry shell
if it doesn't manage to find shell files
#9269
Labels
poetry shell
if it doesn't manage to find shell files
#9269
Issue Kind
Change in current behaviour
Description
Currently in poetry 1.8.2, and I am using zshell (default on macOS). My zshell configuration is slightly different than usual, as I keep my dot-z-shell files in a separate
infra
folder, as I like to version them, in my$HOME
, I and a single.zshenv
file:When I try to enter into a virtualenv with
$ poetry shell
I get the following messages:So
poetry shell
is trying to access the system-wide zshell files at/etc/
(I believe this is because it couldn't find the zshell files in my home directory) and in this process it is truncating my$PATH
as the the values of$PATH
in the environment do not contain the usual paths, such as/usr/local/bin
,/usr/bin
,/bin
,/usr/sbin
, ...Moreover, I was about to ask if it would be desirable to implement a functionality for
poetry bash
that inspects the shell files available, say at$HOME
and if it can't find any shell files, it aborts the command altogether with the message "Please provide argument '--path' for locating your shell files"Impact
$ poetry shell
command will have limited functionality when user keep their shell files in non-obvious places.Workarounds
Looking in the documentation I tried using
VIRTUAL_ENV_DISABLE_PROMPT=1
. Of course I could just activate the shell on my ownsource $(poetry env info --path)/bin/activate
, but I am not sure ifpoetry bash
is doing some other nice things that I want, or if it is just activating the shell.The text was updated successfully, but these errors were encountered: