@cryptotaxi247 / kubo / commits / a11c54240

test(harness): skip environment variables starting with =

Adin Schmahmann committed Aug 31, 2023 at 00:30 UTC a11c5424085771fde748702185a958d301ebb8f7
1 file changed +5
test/cli/harness/run.go
+5
@@ -48,6 +48,11 @@ func environToMap(environ []string) map[string]string {
48 m := map[string]string{}
49 for _, e := range environ {
50 kv := strings.Split(e, "=")
51 + // Skip environment variables that start with =
52 + // These can occur in Windows https://github.com/golang/go/issues/61956
53 + if kv[0] == "" {
54 + continue
55 + }
56 m[kv[0]] = kv[1]
57 }
58 return m