diff --git a/builder/builder.go b/builder/builder.go index c6b66e9e..7f56d845 100644 --- a/builder/builder.go +++ b/builder/builder.go @@ -242,7 +242,7 @@ func getWasmvmVersion(modFile *modfile.File) string { for _, item := range modFile.Require { // Must have 2 tokens, repo & version if (len(item.Syntax.Token) == 2) && (strings.Contains(item.Syntax.Token[0], wasmvmRepo)) { - wasmvmRepo = item.Syntax.Token[0] + wasmvmRepo = strings.TrimSuffix(item.Syntax.Token[0], "/v2") wasmvmVersion = item.Syntax.Token[1] } } @@ -251,7 +251,7 @@ func getWasmvmVersion(modFile *modfile.File) string { for _, item := range modFile.Replace { // Must have 3 or more tokens if (len(item.Syntax.Token) > 2) && (strings.Contains(item.Syntax.Token[0], wasmvmRepo)) { - wasmvmRepo = item.Syntax.Token[len(item.Syntax.Token)-2] + wasmvmRepo = strings.TrimSuffix(item.Syntax.Token[len(item.Syntax.Token)-2], "/v2") wasmvmVersion = item.Syntax.Token[len(item.Syntax.Token)-1] } }