-
-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Skip PoetryExecutor if poetry is not found #175
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @kzrnm , I'm curious to know more about your use case for this? Though I guess this behaviour makes sense if you have a project with a poetry managed local venv, but just don't have poetry somewhere discoverable for whatever reason.
Though I think falling back to the simple executor could be surprising.
# Microsoft.PowerShell_profile.ps1
Set-Alias poetry "${env:APPDATA}\pypoetry\venv\Scripts\poetry.exe" I use poetry via alias on PowerShell, so that python interpreter cannot find poetry command and raise poethepoet/poethepoet/executor/poetry.py Lines 80 to 85 in 903ed9a
SimpleExecutor work properly.In ExampleGit bash,
[tool.poe.tasks.env]
shell = "/usr/bin/env | /usr/bin/grep ^PATH="
PowerShell
[tool.poe.tasks.env]
shell = "(dir Env:PATH).Value"
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update. I'm happy to merge this once we work out what's going on with the tests.
Although maybe it could still be improved:
I wonder if it would be a good idea to log a warning when poe fallback to the SimpleExecutor in a poetry governed project because the poetry executable can't be found.
Alternatively I wonder if it would be better still if poe were to specifically check for poetry at $APPDATA/pypoetry/venv/Scripts/poetry if running on windows and poetry doesn't show up on the path?
@nat-n I updated i don't know why, but CI have worked. |
poe cannot run
PoetryExecutor
if poetry is set as an alias instead of$PATH
.I want to skip
PoetryExecutor
when poetry is not found.