Skip to content

Conversation

@jberkenbilt
Copy link
Contributor

See #2102. I think the actual behavior of --dir is useful and described correctly in the Getting Started section of the documentation, but the help and CLI reference don't explain it correctly.

The docs and help describe it as setting the working directory, but what it actually seems to do is to set the directory from which to start searching for a Taskfile. This is useful for running utility-like Taskfiles and seems like a useful feature that is distinct from setting the work directory. This PR just changes the docs to match the behavior. I'm not sure whether the behavior is wrong, but changing behavior would be non-compatible. Looking through the tests, I think the tool is behaving as intended, but the docs are misleading.

I just started playing with task today. If you agree with this but want to word it differently or update more docs or change tests, etc., you can discard this and do it a different way.

@andreynering andreynering added the area: docs Changes related to documentation. label Apr 17, 2025
Copy link
Member

@andreynering andreynering left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @jberkenbilt!

Thanks for contributing.

I made a change to the wording because Task will also execute in that directory, as well as look for Taskfiles there.

@andreynering andreynering enabled auto-merge (squash) April 17, 2025 23:08
@andreynering andreynering merged commit e65159f into go-task:main Apr 17, 2025
14 checks passed
@jberkenbilt
Copy link
Contributor Author

Thanks! I guess I didn't quite accurately figure out what it was doing, but the new doc is clear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: docs Changes related to documentation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants