From 679a2e026382bcf9cbf589d5181967fdcf394665 Mon Sep 17 00:00:00 2001 From: bharathkkb Date: Thu, 21 Dec 2023 06:21:27 +0000 Subject: [PATCH] graceful exit for non conforming repos --- infra/module-swapper/cmd/swap.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/infra/module-swapper/cmd/swap.go b/infra/module-swapper/cmd/swap.go index aaea8baed2d..77deb9791dd 100644 --- a/infra/module-swapper/cmd/swap.go +++ b/infra/module-swapper/cmd/swap.go @@ -385,8 +385,9 @@ func writeModuleRefs(f []byte, p string, moduleRefs map[string]string) ([]byte, func SwapModules(rootPath, moduleRegistrySuffix, moduleRegistryPrefix, subModulesDir, examplesDir string, restore bool) { rootPath = filepath.Clean(rootPath) moduleName, foundRegistryPrefix, err := getModuleNameRegistry(rootPath) - if err != nil { - log.Fatal(err) + if err != nil && moduleRegistryPrefix == "" { + log.Printf("failed to get module name and registry: %v", err) + return } if moduleRegistryPrefix != "" {