From 5ac51663da02a7d0f3b57d60586d4b0d8389671f Mon Sep 17 00:00:00 2001 From: Shikachuu Date: Sat, 28 Aug 2021 13:49:29 +0200 Subject: [PATCH] Added default value in case of missing env-var Signed-off-by: Shikachuu --- pkg/provider/handlers/deploy.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/provider/handlers/deploy.go b/pkg/provider/handlers/deploy.go index fec5f24..8055a0d 100644 --- a/pkg/provider/handlers/deploy.go +++ b/pkg/provider/handlers/deploy.go @@ -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",