-
-
Notifications
You must be signed in to change notification settings - Fork 616
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
Computed environment variables have started happening in the task directory. #1536
Comments
@PaulPopat I'm not able to reproduce this. Results on my machine with the following content in
v3.34.1
v3.35.1
What is inside your |
Hi @pd93 Sorry it appears I miss a critical step in trying to make a minimal reproduction. It must be a sub task and it must be called without the In Taskfile.yml version: '3'
env:
TEST_STRING:
sh: ./scripts/get-data.sh
tasks:
test:working:
cmds:
- echo "$TEST_STRING"
test:broken:
cmds:
- task test:working
dir: "{{.TASKFILE_DIR}}/test/other" In #!/bin/bash
echo "TEST: $(pwd)" Console output
A snippet to better demonstrate our use case version: '3'
env:
AWS_ACCESS_KEY_ID:
sh: ./utilities/assume.sh AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY:
sh: ./utilities/assume.sh AWS_SECRET_ACCESS_KEY
AWS_SESSION_TOKEN:
sh: ./utilities/assume.sh AWS_SESSION_TOKEN
tasks:
test:browser:project:
dir: "{{.TASKFILE_DIR}}/packages/tests"
cmds:
- rm -f ../../artifacts/ui-tests-app.log
- task launch:app > ../../artifacts/ui-tests-app.log && sleep 2 &
- task: utils:wait-for-ports
vars:
PORTS: '8888,7654,5432'
- yarn run test --all=true |
@PaulPopat that issue was fixed in 3.35.1. From your console output, I can see that you're still running 3.35.0. I've just published the patch to npm, so you should be able to update and try again. Please let me know if this fixes the issue for you. |
That has done it. Thank you very much! |
When running a computed environment at the top of a task file, the working directory used to be the task file directory. Now it is the directory specified in the specific task. This means that referencing setup files is breaking.
The text was updated successfully, but these errors were encountered: