From 2988f0c06b178e097908669aa34fbac708842677 Mon Sep 17 00:00:00 2001 From: Matej Vasek Date: Thu, 22 Sep 2022 15:00:12 +0200 Subject: [PATCH] fix: nil deref when custom builder image (#1273) Signed-off-by: Matej Vasek Signed-off-by: Matej Vasek --- function.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/function.go b/function.go index 98be557ec..bc7fc33fe 100644 --- a/function.go +++ b/function.go @@ -153,6 +153,8 @@ func NewFunctionWith(defaults Function) Function { // selectively consider the minimal validation necesssary to ehable migration. func NewFunction(path string) (f Function, err error) { f.Root = path // path is not persisted, as this is the purvew of the FS itself + f.BuilderImages = make(map[string]string) + f.Annotations = make(map[string]string) var filename = filepath.Join(path, FunctionFile) if _, err = os.Stat(filename); err != nil { return