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:
committed by
Andrey Nering
parent
300376b0b1
commit
72bfd94329
1
testdata/env/.gitignore
vendored
Normal file
1
testdata/env/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
env.txt
|
10
testdata/env/Taskfile.yml
vendored
Normal file
10
testdata/env/Taskfile.yml
vendored
Normal 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
|
Reference in New Issue
Block a user