From 7438c7ad064540078ec4ab3a7b44a025f11cd83d Mon Sep 17 00:00:00 2001 From: Matt Toohey Date: Mon, 7 Oct 2024 13:53:14 +1100 Subject: [PATCH] fix: emty replace flag is allowed in `ftl new go` --- internal/buildengine/plugin_go.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/buildengine/plugin_go.go b/internal/buildengine/plugin_go.go index 1383a7b177..ed63e381aa 100644 --- a/internal/buildengine/plugin_go.go +++ b/internal/buildengine/plugin_go.go @@ -79,7 +79,7 @@ func (p *goPlugin) CreateModule(ctx context.Context, projConfig projectconfig.Co GoVersion: runtime.Version()[2:], Replace: map[string]string{}, } - if replaceStr, ok := flags["replace"]; ok { + if replaceStr, ok := flags["replace"]; ok && replaceStr != "" { for _, replace := range strings.Split(replaceStr, ",") { parts := strings.Split(replace, "=") if len(parts) != 2 {