mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-01-24 04:16:27 +02:00
fix: split env vars into only two parts
The loadEnv() function was splitting env vars on all `=` characters which is not correct. Env vars are `key=val` and contain only two parts.
This commit is contained in:
parent
0074b79819
commit
3e0b7fbd46
@ -39,7 +39,7 @@ func ldflags(ctx *context.Context, build config.Build) (string, error) {
|
||||
func loadEnvs() map[string]string {
|
||||
r := map[string]string{}
|
||||
for _, e := range os.Environ() {
|
||||
env := strings.Split(e, "=")
|
||||
env := strings.SplitN(e, "=", 2)
|
||||
r[env[0]] = env[1]
|
||||
}
|
||||
return r
|
||||
|
Loading…
x
Reference in New Issue
Block a user