mirror of
https://github.com/go-task/task.git
synced 2025-09-16 09:26:16 +02:00
fix: add changelog + fix for booleans for #1641
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
# Changelog
|
||||
|
||||
## Unreleased
|
||||
|
||||
- Fix bug where non-string values (numbers, bools) added to `env:` weren't been
|
||||
correctly exported (#1640, #1641 by @vmaerten and @andreynering).
|
||||
|
||||
## v3.37.0 - 2024-05-08
|
||||
|
||||
- Released the
|
||||
|
2
internal/env/env.go
vendored
2
internal/env/env.go
vendored
@@ -29,7 +29,7 @@ func Get(t *ast.Task) []string {
|
||||
|
||||
func isTypeAllowed(v any) bool {
|
||||
switch v.(type) {
|
||||
case string, int, float32, float64:
|
||||
case string, bool, int, float32, float64:
|
||||
return true
|
||||
default:
|
||||
return false
|
||||
|
@@ -103,7 +103,7 @@ func TestEnv(t *testing.T) {
|
||||
Files: map[string]string{
|
||||
"local.txt": "GOOS='linux' GOARCH='amd64' CGO_ENABLED='0'\n",
|
||||
"global.txt": "FOO='foo' BAR='overriden' BAZ='baz'\n",
|
||||
"multiple_type.txt": "FOO='1' BAR='' BAZ='1.1'\n",
|
||||
"multiple_type.txt": "FOO='1' BAR='true' BAZ='1.1'\n",
|
||||
},
|
||||
}
|
||||
tt.Run(t)
|
||||
|
Reference in New Issue
Block a user