lib/mixlib/install.rb in mixlib-install-3.12.3 vs lib/mixlib/install.rb in mixlib-install-3.12.5
- old
+ new
@@ -23,10 +23,11 @@
require_relative "install/backend"
require_relative "install/options"
require_relative "install/generator"
require_relative "install/generator/bourne"
require_relative "install/generator/powershell"
+require_relative "install/dist"
module Mixlib
class Install
attr_reader :options
@@ -117,11 +118,11 @@
#
def root
# This only works for chef and chefdk but they are the only projects
# we are supporting as of now.
if options.for_ps1?
- "$env:systemdrive\\opscode\\#{options.product_name}"
+ "$env:systemdrive\\#{Mixlib::Install::Dist::WINDOWS_INSTALL_DIR}\\#{options.product_name}"
else
"/opt/#{options.product_name}"
end
end
@@ -134,10 +135,10 @@
# chef & chefdk since version-manifest is created under the
# install directory which can be different than the product name (e.g.
# chef-server -> /opt/opscode). But this is OK for now since
# chef & chefdk are the only supported products.
version_manifest_file = if options.for_ps1?
- "$env:systemdrive\\opscode\\#{options.product_name}\\version-manifest.json"
+ "$env:systemdrive\\#{Mixlib::Install::Dist::WINDOWS_INSTALL_DIR}\\#{options.product_name}\\version-manifest.json"
else
"/opt/#{options.product_name}/version-manifest.json"
end
if File.exist? version_manifest_file