Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User-defined variable substitution in [tools.poe.env] does not work since 0.26.0 #223

Closed
dbohdan opened this issue Jun 15, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@dbohdan
Copy link
Contributor

dbohdan commented Jun 15, 2024

In Poe 0.25.1 I was able to substitute one [tools.poe.env] variable in another. Since 0.26.0, this no longer works. (Due to #214?)

Let's try the following pyproject.toml file.

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "test"
authors = []
description = ""
version = "0.0.1"

[tool.poe.env]
BASE_DIR = "/foo"
SUBDIR = "${BASE_DIR}/bar/"

[tool.poe.tasks.frobnicate]
cmd = "echo ${SUBDIR}"

Here is how the task frobnicate runs in different versions of Poe.

> pipx install --force poethepoet==0.25.1
Installing to existing venv 'poethepoet'
  installed package poethepoet 0.25.1, installed using Python 3.12.1
  These apps are now globally available
    - poe
done! ✨ 🌟 ✨
> poe frobnicate
Poe => echo /foo/bar/
/foo/bar/
> pipx install --force poethepoet==0.26.0
[...]
done! ✨ 🌟 ✨
> poe frobnicate
Poe => echo /bar/
/bar/
> pipx install --force poethepoet==0.26.1
[...]
done! ✨ 🌟 ✨
> poe frobnicate
Poe => echo /bar/
/bar/
@nat-n nat-n added the bug Something isn't working label Jun 18, 2024
@nat-n
Copy link
Owner

nat-n commented Jun 18, 2024

Hi @dbohdan, thanks for reporting this.

Yep looks like something went wrong with 0.26.0. I'll look into this as soon as I have some time for it.

If you able and willing to contribute a PR with a failing test case that would be a help :)

@nat-n nat-n closed this as completed in efcbea0 Jun 26, 2024
@nat-n
Copy link
Owner

nat-n commented Jun 26, 2024

This issue is fixed in 0.27.0 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants