mirror of https://github.com/knative/func.git
fix: nil deref when custom builder image (#1273)
Signed-off-by: Matej Vasek <mvasek@redhat.com> Signed-off-by: Matej Vasek <mvasek@redhat.com>
This commit is contained in:
parent
44ff20d782
commit
2988f0c06b
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue