From 5f0222008bb979dce4d1af96c8c833a795429639 Mon Sep 17 00:00:00 2001 From: Nikhil Sharma Date: Thu, 1 Jun 2023 10:22:31 +0530 Subject: [PATCH] use template store pull in build for fetching the configured template first Signed-off-by: Nikhil Sharma --- commands/build.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/commands/build.go b/commands/build.go index 98d30dd1..39c5937a 100644 --- a/commands/build.go +++ b/commands/build.go @@ -174,9 +174,8 @@ func runBuild(cmd *cobra.Command, args []string) error { return fmt.Errorf("could not pull templates from function yaml file: %s", err.Error()) } } else { - templateAddress := getTemplateURL("", os.Getenv(templateURLEnvironment), DefaultTemplateRepository) - if pullErr := pullTemplates(templateAddress); pullErr != nil { - return fmt.Errorf("could not pull templates for OpenFaaS: %v", pullErr) + for _, function := range services.Functions { + runTemplateStorePull(cmd, []string{function.Language}) } } if len(services.Functions) == 0 {