Skip to content

Commit

Permalink
fix: emty replace flag is allowed in ftl new go (#3010)
Browse files Browse the repository at this point in the history
fixes #3006
This was due to FTL trying to parse `""` as the format `A=B,C=D` and
failing when it didn't have any pairs.
  • Loading branch information
matt2e authored Oct 7, 2024
1 parent b14051f commit 08a1de5
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 08a1de5

Please sign in to comment.