Skip to content

Commit bfc9d78

Browse files
committed
fix: add changelog + fix for booleans for #1641
1 parent 3397f28 commit bfc9d78

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## Unreleased
4+
5+
- Fix bug where non-string values (numbers, bools) added to `env:` weren't been
6+
correctly exported (#1640, #1641 by @vmaerten and @andreynering).
7+
38
## v3.37.0 - 2024-05-08
49

510
- Released the

internal/env/env.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ func Get(t *ast.Task) []string {
2929

3030
func isTypeAllowed(v any) bool {
3131
switch v.(type) {
32-
case string, int, float32, float64:
32+
case string, bool, int, float32, float64:
3333
return true
3434
default:
3535
return false

task_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ func TestEnv(t *testing.T) {
103103
Files: map[string]string{
104104
"local.txt": "GOOS='linux' GOARCH='amd64' CGO_ENABLED='0'\n",
105105
"global.txt": "FOO='foo' BAR='overriden' BAZ='baz'\n",
106-
"multiple_type.txt": "FOO='1' BAR='' BAZ='1.1'\n",
106+
"multiple_type.txt": "FOO='1' BAR='true' BAZ='1.1'\n",
107107
},
108108
}
109109
tt.Run(t)

0 commit comments

Comments
 (0)