mirror of
https://github.com/caddyserver/caddy.git
synced 2026-05-30 11:26:56 -04:00
Fix for invalid environment variable names used on windows that start with an equals symbol. Even though this contradicts the Microsoft docs.
This commit is contained in:
@@ -64,7 +64,7 @@ func (c Context) Env() map[string]string {
|
||||
envVars := make(map[string]string, len(osEnv))
|
||||
for _, env := range osEnv {
|
||||
data := strings.SplitN(env, "=", 2)
|
||||
if len(data) == 2 {
|
||||
if len(data) == 2 && len(data[0]) > 0 {
|
||||
envVars[data[0]] = data[1]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user