From 4b4f03164ada3d0f3ef2242738c95dd2637a8cc7 Mon Sep 17 00:00:00 2001 From: Oren Raab Date: Sun, 19 Jun 2022 18:22:20 +0300 Subject: [PATCH] bugfix: updating parsing of terraform registry --- pkg/list_versions.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/list_versions.go b/pkg/list_versions.go index b9e0122..9e7e4c0 100644 --- a/pkg/list_versions.go +++ b/pkg/list_versions.go @@ -26,11 +26,11 @@ func GetTFList(mirrorURL string, preRelease bool) ([]string, error) { var semver string if preRelease { // Getting versions from body; should return match /X.X.X-@/ where X is a number,@ is a word character between a-z or A-Z - semver = `\/(\d+\.\d+\.\d+)(-[a-zA-z]+\d*)?\"` + semver = `\/(\d+\.\d+\.\d+)(-[a-zA-z]+\d*)?\/\"` } else if !preRelease { // Getting versions from body; should return match /X.X.X/ where X is a number // without the ending '"' pre-release folders would be tried and break. - semver = `\/(\d+\.\d+\.\d+)\"` + semver = `\/(\d+\.\d+\.\d+)\/\"` } r, _ := regexp.Compile(semver) for i := range result {