mirror of https://github.com/joho/godotenv.git
Expand variables on parseValue
parent
33977c2d8d
commit
50c29652a0
|
@ -291,6 +291,13 @@ func parseValue(value string, envMap map[string]string) string {
|
|||
}
|
||||
}
|
||||
|
||||
// expand variables
|
||||
value = os.Expand(value, func(key string) string {
|
||||
if val, ok := envMap[key]; ok {
|
||||
return val
|
||||
}
|
||||
return ""
|
||||
})
|
||||
return value
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue