Skip to content

Commit

Permalink
Merge pull request #69 from free1139/patch-1
Browse files Browse the repository at this point in the history
Update config.go
  • Loading branch information
ochinchina authored Mar 2, 2018
2 parents 935b0a3 + 359d425 commit 354e8ce
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ func (c *ConfigEntry) GetEnv(key string) []string {
i++
}
if i < n {
env = append(env, fmt.Sprintf("%s=%s", key, value[start+1:i]))
env = append(env, fmt.Sprintf("%s=%s", strings.TrimSpace(key), strings.TrimSpace(value[start+1:i])))
}
if i+1 < n && value[i+1] == ',' {
start = i + 2
Expand All @@ -331,10 +331,10 @@ func (c *ConfigEntry) GetEnv(key string) []string {
i++
}
if i < n {
env = append(env, fmt.Sprintf("%s=%s", key, value[start:i]))
env = append(env, fmt.Sprintf("%s=%s", strings.TrimSpace(key), strings.TrimSpace(value[start:i])))
start = i + 1
} else {
env = append(env, fmt.Sprintf("%s=%s", key, value[start:]))
env = append(env, fmt.Sprintf("%s=%s", strings.TrimSpace(key), strings.TrimSpace(value[start:])))
break
}
}
Expand Down

0 comments on commit 354e8ce

Please sign in to comment.