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

Tasks run in the current directory by default #180

Closed
dbohdan opened this issue Nov 12, 2023 · 3 comments · Fixed by #181
Closed

Tasks run in the current directory by default #180

dbohdan opened this issue Nov 12, 2023 · 3 comments · Fixed by #181
Assignees
Labels
bug Something isn't working

Comments

@dbohdan
Copy link
Contributor

dbohdan commented Nov 12, 2023

In version 0.24.2 (since commit 51a6fd7? I haven't bisected it.) the default task behavior has changed. Tasks run in the current directory instead of the project directory. This looks like a bug, because the documentation says:

By default tasks are run from the project root – that is the parent directory of the pyproject.toml file.

The change is the easiest to demonstrate if you define a task that prints the current directory.

[tool.poe.tasks.pwd]
cmd = "pwd"

Then run,

> pipx install poethepoet==0.24.1
...
> poe --root proj pwd
Poe => pwd
/home/user/proj
> pipx uninstall poethepoet
...
> pipx install poethepoet==0.24.2
...
> poe --root proj pwd
Poe => pwd
/home/user

As a temporary workaround, you can add cwd = "" to your tasks.

@nat-n
Copy link
Owner

nat-n commented Nov 12, 2023

Hi @dbohdan, thanks for reporting this, looks like a bug slipped in as part of this change.

@nat-n
Copy link
Owner

nat-n commented Nov 12, 2023

Aaaaaaaaaand it's fixed 0.24.3 🚀

@dbohdan
Copy link
Contributor Author

dbohdan commented Nov 13, 2023

Yay!

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

Successfully merging a pull request may close this issue.

2 participants