Skip to content

Commit

Permalink
bugfix: updating parsing of terraform registry
Browse files Browse the repository at this point in the history
  • Loading branch information
oraab authored and jb-abbadie committed Jun 19, 2022
1 parent e87de16 commit 4b4f031
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/list_versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 4b4f031

Please sign in to comment.