-
-
Notifications
You must be signed in to change notification settings - Fork 551
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
why is the following not working? #1492
Comments
I use it like this and it works:
version: '3'
vars:
ENV: prod
PROJECT: # Task parameter/arguments are not yet available in root interpolation/templating, Taskfile also does not support top level require
sh: '[ -z "${PROJECT+x}" ] && { echo "Error: PROJECT is not defined" >&2; exit 1; } || echo "$PROJECT"' It is possible that it is not available as environment variable in tasks, but only at top level. |
Hello @bayeslearner greet_user:
desc: "Greet the user with a name."
vars:
USER_NAME: '{{.USER_NAME| default "DefaultUser"}}'
cmds:
- echo "Hello, {{.USER_NAME}}!" Both |
It seems
USER_NAME=abc task ctx:greet_user
works on linuxbut
task ctx:greet_user USER_NAME=abc
does not work on linux.The text was updated successfully, but these errors were encountered: