Skip to content

Commit

Permalink
Merge pull request #233 from wubin1989/main
Browse files Browse the repository at this point in the history
...
  • Loading branch information
wubin1989 authored Jul 9, 2024
2 parents 0c2e3aa + a8f7766 commit 34466d0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion toolkit/yaml/yaml.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"fmt"
"github.com/ghodss/yaml"
"github.com/jeremywohl/flatten"
"github.com/spf13/cast"
"io"
"io/ioutil"
"os"
Expand All @@ -27,7 +28,7 @@ func load(data []byte) error {
for k, v := range flat {
upperK := strings.ToUpper(strings.ReplaceAll(k, "-", ""))
if !currentEnv[upperK] {
_ = os.Setenv(upperK, fmt.Sprint(v))
_ = os.Setenv(upperK, cast.ToString(v))
}
}
return nil
Expand Down

0 comments on commit 34466d0

Please sign in to comment.