-
-
Notifications
You must be signed in to change notification settings - Fork 641
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
Doubt about static/dynamic env
and tasks with dir
#854
Comments
Super-tiny update: I refactored my global |
@Northburns vars:
DIR_TEMP: temp
DIR_DATA: data
D1:
sh: ls -1 {{.DIR_DATA}} || echo "ERROR1 ({{.DIR_DATA}} @ $(basename "$(pwd)"))"
D2:
sh: ls -1 data || echo "ERROR2 (data @ $(basename "$(pwd)"))"
env:
D1: "{{.D1}}"
D2: "{{.D2}}" |
Thank you, that is totally suitable for my cases 👍 |
Example Taskfile showing the issue
Running
task setup
sets up files for the demo. Execution:It looks like if I run the
default
task, the envs are evaluated in the taskfile's directory. If I runt1
task, the envs are evaluated int1
's directory. The thing that I have doubts about is thatD2
is evaluated as I expected. It doesn't have any templating, could that be a lead?In my actual use case I just need the contents of a certain fixed directory (
data
😄 ) in an env variable. I think I can circumvent this by hardcoding directory names, which leads to a non-templated env sh, which is totally fine for my use case. I tried to read the documentation if there's something I'm misunderstanding or missing. Any insight or help is appreciated. This might relate to issues #442 #524 #591The text was updated successfully, but these errors were encountered: