-
-
Notifications
You must be signed in to change notification settings - Fork 625
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
Feature: Allow reading dir and/or entrypoint from env #402
Comments
Another read of the code: a pretty minor adjustment to the pflag setup can read defaults for all args from env. This should be 100% backwards-compat - it's just adding an alternate default to pflag. The only concern, I suppose, would be boot time for those who use a bash completion fn. The alternate-default handler is a pretty trivial ternany return, but it would exec several times for each |
Sidenote: this would play well with #401, assuming it's accepted. There will undoubtedly be users who want to show all tasks by default. |
Hi @therealkevinard, Sorry for the 8 months delay. Lot's of issues here, having a hard time to keep up. If I understood correctly you're proposing that we have envs for Yeah, I think that's likely simple enough. We already have an env for |
Were you able to get this to work, @therealkevinard? This would be absolutely amazing |
Are there plans to allow dir/entrypoint from sources other than flag/pwd?
I have early work on this in my fork, but would like to open the conversation before going too far with it.
Use case: task is amazing for monorepos, of course. But monorepos, by nature, may have you at any point in the file tree. It's nice to be able to run repo commands from x directory in the tree. (Eg: trigger a build while you're in
path/to/go/service
that also builds the dep atpath/to/vue/client
).My initial thought was reverse-traversal, looking up the tree until a
Taskfile.yml
is found, but that carries risk - a task can be intentionally destructive, and that's okay as long as you don't accidentally call it from the wrong place.Also, it's restrictive. That becomes "the way" to find the root.
Allowing dir args from env
The text was updated successfully, but these errors were encountered: