summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVivek Singh <vivek.singh@msystechnologies.com>2019-08-13 10:47:39 +0530
committerVivek Singh <vivek.singh@msystechnologies.com>2019-08-13 10:47:39 +0530
commit4f948443e1b5b7da2945cb7c04d7e1bea0817618 (patch)
tree8533dec7b948496ed4d1bcff78c0b8c59f626c2d
parent830033cd147ec2e7d57eac4c535c53c876d445de (diff)
downloadchef-4f948443e1b5b7da2945cb7c04d7e1bea0817618.tar.gz
bootstrap version using version_string class
Signed-off-by: Vivek Singh <vivek.singh@msystechnologies.com>
-rw-r--r--lib/chef/knife/bootstrap.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/chef/knife/bootstrap.rb b/lib/chef/knife/bootstrap.rb
index 7e50c24547..d5ed0272d5 100644
--- a/lib/chef/knife/bootstrap.rb
+++ b/lib/chef/knife/bootstrap.rb
@@ -22,6 +22,7 @@ require "erubis"
require "chef/knife/bootstrap/chef_vault_handler"
require "chef/knife/bootstrap/client_builder"
require "chef/util/path_helper"
+require_relative "../version_string"
class Chef
class Knife
@@ -517,7 +518,7 @@ class Chef
def bootstrap_version_gte_15?
config[:prerelease] ||
(!!config[:bootstrap_version] &&
- (config[:bootstrap_version] == "latest" || config[:bootstrap_version].to_i >= 15))
+ (config[:bootstrap_version] == "latest" || Chef::VersionString.new(config[:bootstrap_version]) >= 15.0))
end
end
end