You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a Maven project that ends up executing Poetry during a maven build. I use pyenv to manage my Python versions, and jenv to manage my Java versions. I have the maven plugin for jenv enabled so that Maven uses the Java version set by jenv.
When Poetry is executed via Maven, it is using the system Python version of 2.7 instead of the pyenv set version of 3.11. This happens only when the jenv maven plugin is enabled. If that plugin is disabled, Poetry correctly uses the pyenv version of Python. It appears this happens because jenv-exec is add /usr/local/bin to the front of the PATH variable. This breaks the intended PATH resolution of having pyenv shims above the more global /usr/local/bin directory.
Environment/Setup
I have a Maven project that ends up executing Poetry during a maven build. I use pyenv to manage my Python versions, and jenv to manage my Java versions. I have the maven plugin for jenv enabled so that Maven uses the Java version set by jenv.
OS: MacOS Monterey
Shell: Zsh 5.8.1
Jenv: 0.5.6
Jenv Plugins: export, maven
Maven: 3.9.4
Java: 11.0.16
Pyenv: 2.3.25
Python: 3.11.4
Poetry: 1.6.1
Issue Description
When Poetry is executed via Maven, it is using the system Python version of 2.7 instead of the pyenv set version of 3.11. This happens only when the jenv maven plugin is enabled. If that plugin is disabled, Poetry correctly uses the pyenv version of Python. It appears this happens because
jenv-exec
is add/usr/local/bin
to the front of thePATH
variable. This breaks the intended PATH resolution of having pyenv shims above the more global /usr/local/bin directory.Full JENV_DEBUG Output
The text was updated successfully, but these errors were encountered: