Skip to content

Commit

Permalink
fix: ingtegrate Wes's fix
Browse files Browse the repository at this point in the history
  • Loading branch information
alecthomas committed Jan 16, 2024
1 parent 96d8be5 commit 561cef4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion go-runtime/compile/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,11 @@ func updateGoModule(goModPath string) (version string, err error) {
return "", fmt.Errorf("failed to parse %s: %w", goModPath, err)
}
if ftl.IsRelease(ftl.Version) {
if err := goModfile.AddRequire("github.com/TBD54566975/ftl", "v"+ftl.Version); err != nil {
version := ftl.Version
if !strings.HasPrefix(version, "v") {
version = "v" + version
}
if err := goModfile.AddRequire("github.com/TBD54566975/ftl", version); err != nil {
return "", fmt.Errorf("failed to add github.com/TBD54566975/ftl to %s: %w", goModPath, err)
}
goModBytes = modfile.Format(goModfile.Syntax)
Expand Down

0 comments on commit 561cef4

Please sign in to comment.