mirror of
https://github.com/go-task/task.git
synced 2026-07-02 08:58:41 +00: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
12
task_test.go
12
task_test.go
@@ -54,6 +54,18 @@ func (fct fileContentTest) Run(t *testing.T) {
|
||||
|
||||
}
|
||||
|
||||
func TestEnv(t *testing.T) {
|
||||
tt := fileContentTest{
|
||||
Dir: "testdata/env",
|
||||
Target: "default",
|
||||
TrimSpace: false,
|
||||
Files: map[string]string{
|
||||
"env.txt": "GOOS='linux' GOARCH='amd64' CGO_ENABLED='0'\n",
|
||||
},
|
||||
}
|
||||
tt.Run(t)
|
||||
}
|
||||
|
||||
func TestVars(t *testing.T) {
|
||||
tt := fileContentTest{
|
||||
Dir: "testdata/vars",
|
||||
|
||||
Reference in New Issue
Block a user