We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I declared global env in a taskfile like so:
--- version: "3" env: DB_DRIVER: mysql DB_DSN: "etl:etl@tcp(localhost:3306)/etl" tasks: default: desc: "Fill repos with details" vars: repos: sh: env | grep DB_ || true cmds: - env | grep DB || true - for: { var: repos, as: repo, split: "\n" } silent: true cmd: echo "X{{.repo}}"
The expected output of this would be:
DB_DRIVER=mysql DB_DSN=etl:etl@tcp(localhost:3306)/etl XDB_DRIVER=mysql XDB_DSN=etl:etl@tcp(localhost:3306)/etl
Actual output of this is:
DB_DRIVER=mysql DB_DSN=etl:etl@tcp(localhost:3306)/etl X
Seems the vars sh are not picking up the taskfile env which would be my expectation...
sh
The text was updated successfully, but these errors were encountered:
I have stumbled over that too:
~/d/tmp►batcat Taskfile.yml 4.526s 14:52 ───────┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── │ File: Taskfile.yml ───────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 1 │ version: "3" 2 │ 3 │ env: 4 │ GLOBAL_NAME: "foo" 5 │ 6 │ tasks: 7 │ hello: 8 │ cmds: 9 │ - echo "$GLOBAL_NAME" 10 │ - echo "$INDIRECT_NAME" 11 │ - echo "$ENV_NAME" 12 │ env: 13 │ INDIRECT_NAME: 14 │ sh: echo "$GLOBAL_NAME" 15 │ ENV_NAME: 16 │ sh: echo "bar" 17 │ 18 │ ───────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── ~/d/tmp►task hello 14:52 task: [hello] echo "$GLOBAL_NAME" foo task: [hello] echo "$INDIRECT_NAME" task: [hello] echo "$ENV_NAME" bar
It looks like sh initialization does not get globally set env
env
Sorry, something went wrong.
No branches or pull requests
I declared global env in a taskfile like so:
The expected output of this would be:
Actual output of this is:
Seems the vars
sh
are not picking up the taskfile env which would be my expectation...The text was updated successfully, but these errors were encountered: