1
0
mirror of https://github.com/go-task/task.git synced 2025-08-10 22:42:19 +02:00

Fixes env: remove square braces and evaluate shell (#62)

Fixes bug #61, and makes `env` work more similar to `vars` by allowing
dynamic shell values to be evaluated as part of `CompiledTask`.
This commit is contained in:
Sindre Røkenes Myren
2017-08-16 13:04:58 +02:00
committed by Andrey Nering
parent 300376b0b1
commit 72bfd94329
5 changed files with 66 additions and 40 deletions

1
testdata/env/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
env.txt

10
testdata/env/Taskfile.yml vendored Normal file
View File

@@ -0,0 +1,10 @@
default:
vars:
AMD64: amd64
env:
GOOS: linux
GOARCH: "{{.AMD64}}"
CGO_ENABLED:
sh: echo '0'
cmds:
- echo "GOOS='$GOOS' GOARCH='$GOARCH' CGO_ENABLED='$CGO_ENABLED'" > env.txt