diff --git a/plugins/poetry.json b/plugins/poetry.json index a4da8e39675..bed0d139dd6 100644 --- a/plugins/poetry.json +++ b/plugins/poetry.json @@ -1,6 +1,6 @@ { "name": "poetry", - "version": "0.0.5", + "version": "0.0.6", "description": "This plugin automatically configures poetry to use the version of python installed in your Devbox shell, instead of the Python version that it is bundled with. The pyproject.toml location can be configured by setting DEVBOX_PYPROJECT_DIR (defaults to the devbox.json's directory).", "env": { "DEVBOX_DEFAULT_PYPROJECT_DIR": "{{ .DevboxProjectDir }}", @@ -13,7 +13,8 @@ }, "shell": { "init_hook": [ - "\"{{ .Virtenv }}/bin/initHook.sh\"" + "\"{{ .Virtenv }}/bin/initHook.sh\"", + "if [ -d \"${DEVBOX_PYPROJECT_DIR:-$DEVBOX_DEFAULT_PYPROJECT_DIR}/.venv\" ]; then export VIRTUAL_ENV=\"${DEVBOX_PYPROJECT_DIR:-$DEVBOX_DEFAULT_PYPROJECT_DIR}/.venv\"; export PATH=\"$VIRTUAL_ENV/bin:$PATH\"; fi" ] } }