Added default value in case of missing env-var

Signed-off-by: Shikachuu <zcmate@gmail.com>
This commit is contained in:
Shikachuu 2021-08-28 13:49:29 +02:00 committed by Alex Ellis
parent 1e9d8fffa0
commit 5ac51663da

View File

@ -248,6 +248,10 @@ func prepareEnv(envProcess string, reqEnvVars map[string]string) []string {
func getMounts() []specs.Mount {
wd, _ := os.LookupEnv("hosts_dir")
if len(wd) == 0 {
wd = "/var/lib/faasd-provider"
}
mounts := []specs.Mount{}
mounts = append(mounts, specs.Mount{
Destination: "/etc/resolv.conf",