Skip to content

Commit

Permalink
Merge pull request #329 from boltops-tools/check
Browse files Browse the repository at this point in the history
fix terraspace check
  • Loading branch information
tongueroo authored Sep 12, 2023
2 parents 659580b + ea8cc5b commit a82f758
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/terraspace/check.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ def error_message(cloud: false)
See: https://terraspace.cloud/docs/terraform/license/
EOL

puts "ERROR: #{name} requires Terraform between v#{@min_terraform_version}.x and #{@max_terraform_version}".color(:red)
puts "ERROR: #{name} requires Terraform between #{@min_terraform_version}.x and #{@max_terraform_version}".color(:red)
puts <<~EOL
This is because newer versions of Terraform has a BSL license
This is because newer versions of Terraform have a BSL license
If your usage is allowed by the license, you can bypass this check with:
export TS_VERSION_CHECK=0
Expand All @@ -62,6 +62,7 @@ def allowed_terraform_version?
min_ok = major > min_major ||
(major == min_major && minor >= min_minor)
max_ok = major < max_major ||
(major == max_major && minor < max_minor) ||
(major == max_major && minor == max_minor && patch <= max_patch)

min_ok && max_ok
Expand Down

0 comments on commit a82f758

Please # to comment.