We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 891fce5 commit 232c7e4Copy full SHA for 232c7e4
1 file changed
types/mapping.go
@@ -95,7 +95,7 @@ func (m *MappingWithEquals) DecodeMapstructure(value interface{}) error {
95
mapping := make(MappingWithEquals, len(v))
96
for _, s := range v {
97
k, e, ok := strings.Cut(fmt.Sprint(s), "=")
98
- if unicode.IsSpace(rune(k[len(k)-1])) {
+ if k != "" && unicode.IsSpace(rune(k[len(k)-1])) {
99
return fmt.Errorf("environment variable %s is declared with a trailing space", k)
100
}
101
if !ok {
0 commit comments