Skip to content

Commit

Permalink
fix: emty replace flag is allowed in ftl new go
Browse files Browse the repository at this point in the history
  • Loading branch information
matt2e committed Oct 7, 2024
1 parent b14051f commit 7438c7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/buildengine/plugin_go.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 7438c7a

Please sign in to comment.