-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tfswitch doesn't interpret the pessimistic constraint operator the same way that Terraform interprets it #215
Comments
This appears fixed in the top of trunk. Unfortunately, no release yet with this fix. |
See also #208 |
@rux616
should install "1.1.7", right (Mar 8, 2022) ? Reading required version from terraform file
Reading required version from constraint: ~> 1.0
Matched version: 1.1.7
Downloading to: /Users/warrenveerasingam/.terraform.versions
20213394 bytes downloaded |
yes... |
Exactly. And a constraint of |
@rux616 Reading required version from terraform file
Reading required version from constraint: ~> 1.0.0
Matched version: 1.0.11
Switched terraform to version "1.0.11" I will release it shortly. |
Fixed in release 0.13.1218. |
Consider the following Terraform code:
When evaluated by the Terraform binary, it is interpreted as "allow
1.x.*
, wherex
is at least0
". Unfortunately, when evaluated bytfswitch
, it is interpreted as "allow1.0.x
wherex
is at least0
", which is incorrect. According to the Terraform docs:The rightmost version component in the above
~> 1.0
constraint, to use SemVer terminology of major.minor.patch, is the minor version of0
, not the patch version of0
.As it stands right now, to get version 1.x via
tfswitch
you need to use the version constraint of~> 1
, which the Terraform binary will interpret as allowing any major version greater than or equal to1
, e.g.2.0
,3.14.5
, etc.tfswitch
should be using the same definition of the pessimistic constraint operator that the Terraform binary does.The text was updated successfully, but these errors were encountered: