From ea8cc5ba8ae76fe2930026e0b38a1d4ced4c7506 Mon Sep 17 00:00:00 2001 From: Tung Nguyen Date: Tue, 12 Sep 2023 14:15:49 +0000 Subject: [PATCH] fix terraspace check --- lib/terraspace/check.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/terraspace/check.rb b/lib/terraspace/check.rb index 77ba7032..86f4c683 100644 --- a/lib/terraspace/check.rb +++ b/lib/terraspace/check.rb @@ -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 @@ -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