1
0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2026-01-09 21:38:32 +08:00
ohmyzsh-mirror/plugins/poetry-env
Developer f61f623b5b fix(poetry-env): handle in-project virtual environments when path returns "."
When Poetry is configured with virtualenvs.in-project = true,
poetry env info --path returns "." instead of the full path.
This causes the plugin to fail with "no such file or directory: ./bin/activate".

Changes:
- Handle case where poetry returns "." by converting to $PWD/.venv
- Add safety check to ensure activate script exists before sourcing
- Maintain backward compatibility with existing setups

Fixes issue with in-project virtual environments used in monorepos and git worktrees.
2025-06-25 00:51:17 +01:00
..
poetry-env.plugin.zsh fix(poetry-env): handle in-project virtual environments when path returns "." 2025-06-25 00:51:17 +01:00
README.md style: remove trailing whitespace (#12303) 2024-03-26 09:55:16 +01:00

Poetry Environment Plugin

This plugin automatically changes poetry environment when you cd into or out of the project directory. Note: Script looks for pyproject.toml file to determine poetry if its a poetry environment

To use it, add poetry-env to the plugins array in your zshrc file:

plugins=(... poetry-env)