mirror of
https://github.com/openfaas/faasd.git
synced 2025-06-09 08:26:47 +00:00
Added default value in case of missing env-var
Signed-off-by: Shikachuu <zcmate@gmail.com>
This commit is contained in:
parent
1e9d8fffa0
commit
5ac51663da
@ -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",
|
||||
|
Loading…
x
Reference in New Issue
Block a user