Search code examples
pythonpython-poetry

Poetry config resolution order. Do Environment variables superseed poetry config file?


I created a python package with poetry. I can control poetry's behaviour either with a config file and the config commands poetry config virtualenvs.in-project true or with environment variable VIERTUALENVS_IN_PROJECT=false. If I specify a configuration in both places, which one will be chosen?


Solution

  • Setting export POETRY_VIRTUALENVS_IN_PROJECT=false in the .envrc with direnv has precedence over poetry.toml.