-
-
Notifications
You must be signed in to change notification settings - Fork 763
Closed as duplicate of#630
Description
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...
ColorfulRhino and jeongukjae
Metadata
Metadata
Assignees
Labels
No labels