diff --git a/builder/build.go b/builder/build.go index 6a6cd093..3961633d 100644 --- a/builder/build.go +++ b/builder/build.go @@ -59,13 +59,17 @@ func BuildImage(image string, handler string, functionName string, language stri // this was never enforced. langTemplate.Language = language + var tempPath string if isDockerfileTemplate(langTemplate.Language) { - langTemplate = nil - } - - tempPath, err := CreateBuildContext(functionName, handler, langTemplate, copyExtraPaths) - if err != nil { - return err + tempPath, err = CreateBuildContext(functionName, handler, nil, copyExtraPaths) + if err != nil { + return err + } + } else { + tempPath, err = CreateBuildContext(functionName, handler, langTemplate, copyExtraPaths) + if err != nil { + return err + } } if shrinkwrap {