nat-n / poethepoet

A task runner that works well with poetry.
https://poethepoet.natn.io/
MIT License
1.39k stars 56 forks source link

$POE_ROOT/$POE_PWD unavailable in tool.poe.env section #198

Closed tumidi closed 4 months ago

tumidi commented 6 months ago

I'd expect $POE_ROOT/$POE_PWD variables to get expanded in [tool.poe.env].

[tool.poe.env]
GLOBAL_POE_ROOT = "${POE_ROOT}"  # doesn't work

[tool.poe.tasks.my-task]
default_item_type = "cmd"
sequence = [
  "echo GLOBAL_POE_ROOT=${GLOBAL_POE_ROOT}",
  "echo TASK_POE_ROOT=${TASK_POE_ROOT}",
]

[tool.poe.tasks.my-task.env]
TASK_POE_ROOT = "${POE_ROOT}"  # works

I created a minimal reproduction: https://github.com/tumidi/poethepoet-env-test

Output is:

$ poe my-task
GLOBAL_POE_ROOT=
TASK_POE_ROOT=/tmp/poethepoet-env-test
nat-n commented 6 months ago

Hi @tumidi, yes I would expect that too. Thanks for reporting this.

nat-n commented 4 months ago

This was incidentally fixed by the recent refactor of config management that is now on the development branch.

nat-n commented 4 months ago

This issue is now fixed with 0.26.0 🚀