We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5f04daa commit 924bff9Copy full SHA for 924bff9
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