-
-
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
fix: expand task-level dotenv in brackets #1627
base: main
Are you sure you want to change the base?
Conversation
dotenv: ['.env'] | ||
cmds: | ||
- echo "$FOO" > dotenv.txt | ||
- echo "{{.FOO}}" > dotenv-2.txt | ||
- task: dotenv_called | ||
vars: | ||
FOO: "{{.FOO}}" | ||
|
||
dotenv_called: | ||
cmds: | ||
- echo "$FOO" > dotenv-called.txt | ||
- echo "{{.FOO}}" > dotenv-called-2.txt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After this PR, this variable forwarding finally works. There's still room for improvement if the dotenv vars should be automatically propagated to any underlying task. But that could be handled separately.
This PR solves an issue I am running into (thank you @aminya)! For the maintainers: is there a plan or timeline for when this will be merged? Or is there another action required here before it can be considered ready? Thank you! |
can someone review and merge? |
Fixes #997
Task level dotenv didn't expand the variables referenced by
{{.var}}
previously This fixes the issue. I added a test for it to prevent the bug from happening again.