lib/mixlib/install/util.rb in mixlib-install-2.1.10 vs lib/mixlib/install/util.rb in mixlib-install-2.1.11
- old
+ new
@@ -127,9 +127,28 @@
user_agents = %W{mixlib-install/#{Mixlib::Install::VERSION}}
user_agents << headers
# Ensure that if the default user agent is aleady set it doesn't get duplicated
user_agents.flatten.compact.uniq.join(" ")
end
+
+ def map_windows_desktop_version(version)
+ # This logic does not try to compare and determine proper versions based on conditions or ranges.
+ # These are here to improve UX for desktop versions.
+ case version
+ when /^10/
+ "2016"
+ when /^6.3/, /^8.1/
+ "2012r2"
+ when /^6.2/, /^8/
+ "2012"
+ when /^6.1/, /^7/
+ "2008r2"
+ when /^6/
+ "2008"
+ else
+ version
+ end
+ end
end
end
end
end