mirror of
https://github.com/caddyserver/caddy.git
synced 2026-06-29 21:31:41 +00: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:
parent
454b1e3939
commit
f372f5fce7
2 changed files with 15 additions and 1 deletions
|
|
@ -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]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue