Skip to content

Commit

Permalink
fix: add changelog + fix for booleans for #1641
Browse files Browse the repository at this point in the history
  • Loading branch information
andreynering committed May 9, 2024
1 parent 3397f28 commit bfc9d78
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion internal/env/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion task_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit bfc9d78

Please sign in to comment.