summaryrefslogtreecommitdiff
path: root/lib/chef
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef')
-rw-r--r--lib/chef/application/apply.rb2
-rw-r--r--lib/chef/application/exit_code.rb4
-rw-r--r--lib/chef/chef_fs/chef_fs_data_store.rb6
-rw-r--r--lib/chef/chef_fs/file_system/chef_server/policies_dir.rb2
-rw-r--r--lib/chef/chef_fs/file_system/chef_server/rest_list_dir.rb2
-rw-r--r--lib/chef/chef_fs/file_system/multiplexed_dir.rb2
-rw-r--r--lib/chef/cookbook_version.rb8
-rw-r--r--lib/chef/deprecated.rb2
-rw-r--r--lib/chef/dsl/platform_introspection.rb2
-rw-r--r--lib/chef/knife/bootstrap.rb12
-rw-r--r--lib/chef/mixin/create_path.rb16
-rw-r--r--lib/chef/node/mixin/deep_merge_cache.rb14
-rw-r--r--lib/chef/provider/service/simple.rb6
-rw-r--r--lib/chef/provider/windows_task.rb2
-rw-r--r--lib/chef/resource/launchd.rb8
-rw-r--r--lib/chef/resource/macos_userdefaults.rb6
-rw-r--r--lib/chef/resource/windows_firewall_rule.rb4
-rw-r--r--lib/chef/resource/windows_share.rb4
-rw-r--r--lib/chef/resource/windows_task.rb26
-rw-r--r--lib/chef/util/dsc/lcm_output_parser.rb6
-rw-r--r--lib/chef/win32/api/file.rb36
-rw-r--r--lib/chef/win32/process.rb4
22 files changed, 87 insertions, 87 deletions
diff --git a/lib/chef/application/apply.rb b/lib/chef/application/apply.rb
index 7267f4ecfa..33a8a97f5b 100644
--- a/lib/chef/application/apply.rb
+++ b/lib/chef/application/apply.rb
@@ -232,7 +232,7 @@ class Chef::Application::Apply < Chef::Application
Chef::Application.fatal!("#{e.class}: #{e.message}", e)
end
- # Get this party started
+ # Get this party started
def run(enforce_license = false)
reconfigure
check_license_acceptance if enforce_license
diff --git a/lib/chef/application/exit_code.rb b/lib/chef/application/exit_code.rb
index fb1519e573..3235bfadeb 100644
--- a/lib/chef/application/exit_code.rb
+++ b/lib/chef/application/exit_code.rb
@@ -139,8 +139,8 @@ class Chef
def notify_on_deprecation(message)
Chef.deprecated(:exit_code, message)
rescue Chef::Exceptions::DeprecatedFeatureError
- # Have to rescue this, otherwise this unhandled error preempts
- # the current exit code assignment.
+ # Have to rescue this, otherwise this unhandled error preempts
+ # the current exit code assignment.
end
def non_standard_exit_code_warning(exit_code)
diff --git a/lib/chef/chef_fs/chef_fs_data_store.rb b/lib/chef/chef_fs/chef_fs_data_store.rb
index 689ae3bf8a..8237729e89 100644
--- a/lib/chef/chef_fs/chef_fs_data_store.rb
+++ b/lib/chef/chef_fs/chef_fs_data_store.rb
@@ -204,7 +204,7 @@ class Chef
@memory_store.create(path, name, data, *options)
elsif path[0] == "cookbooks" && path.length == 2
- # Do nothing. The entry gets created when the cookbook is created.
+ # Do nothing. The entry gets created when the cookbook is created.
# /policy_groups/GROUP/policies/NAME
elsif path[0] == "policy_groups" && path[2] == "policies"
@@ -724,8 +724,8 @@ class Chef
path[-1] = "#{path[-1]}.json"
end
- # /acls/containers|nodes|... do NOT drop into the next elsif, and do
- # not get .json appended
+ # /acls/containers|nodes|... do NOT drop into the next elsif, and do
+ # not get .json appended
# /nodes|clients|.../x.json
elsif path.length == 2
diff --git a/lib/chef/chef_fs/file_system/chef_server/policies_dir.rb b/lib/chef/chef_fs/file_system/chef_server/policies_dir.rb
index e0d4bea665..aa6981f23c 100644
--- a/lib/chef/chef_fs/file_system/chef_server/policies_dir.rb
+++ b/lib/chef/chef_fs/file_system/chef_server/policies_dir.rb
@@ -66,7 +66,7 @@ class Chef
# }
# }
def children
- # Grab the names of the children, append json, and make child entries
+ # Grab the names of the children, append json, and make child entries
@children ||= begin
result = []
data = root.get_json(api_path)
diff --git a/lib/chef/chef_fs/file_system/chef_server/rest_list_dir.rb b/lib/chef/chef_fs/file_system/chef_server/rest_list_dir.rb
index b60b84cb68..0a1ee83c36 100644
--- a/lib/chef/chef_fs/file_system/chef_server/rest_list_dir.rb
+++ b/lib/chef/chef_fs/file_system/chef_server/rest_list_dir.rb
@@ -71,7 +71,7 @@ class Chef
# Children are foo.json and bar.json in this case.
#
def children
- # Grab the names of the children, append json, and make child entries
+ # Grab the names of the children, append json, and make child entries
@children ||= root.get_json(api_path).keys.sort.map do |key|
make_child_entry(key, true)
end
diff --git a/lib/chef/chef_fs/file_system/multiplexed_dir.rb b/lib/chef/chef_fs/file_system/multiplexed_dir.rb
index 2930dd5d8c..82fa146264 100644
--- a/lib/chef/chef_fs/file_system/multiplexed_dir.rb
+++ b/lib/chef/chef_fs/file_system/multiplexed_dir.rb
@@ -19,7 +19,7 @@ class Chef
def children
result = []
seen = {}
- # If multiple things have the same name, the first one wins.
+ # If multiple things have the same name, the first one wins.
multiplexed_dirs.each do |dir|
dir.children.each do |child|
if seen[child.name]
diff --git a/lib/chef/cookbook_version.rb b/lib/chef/cookbook_version.rb
index a4b0815185..12adb50b4c 100644
--- a/lib/chef/cookbook_version.rb
+++ b/lib/chef/cookbook_version.rb
@@ -358,10 +358,10 @@ class Chef
# extract the preference part from the path.
if manifest_record_path =~ %r{(#{Regexp.escape(segment.to_s)}/[^/]+/#{Regexp.escape(dirname)})/.+$}
- # Note the specificy_dirname includes the segment and
- # dirname argument as above, which is what
- # preferences_for_path returns. It could be
- # "files/ubuntu-9.10/dirname", for example.
+ # Note the specificy_dirname includes the segment and
+ # dirname argument as above, which is what
+ # preferences_for_path returns. It could be
+ # "files/ubuntu-9.10/dirname", for example.
specificity_dirname = $1
# Record the specificity_dirname only if it's in the list of
diff --git a/lib/chef/deprecated.rb b/lib/chef/deprecated.rb
index ecc589d263..9ac08f43ee 100644
--- a/lib/chef/deprecated.rb
+++ b/lib/chef/deprecated.rb
@@ -72,7 +72,7 @@ class Chef
# Just in case someone uses a symbol in the config by mistake.
silence_spec = silence_spec.to_s
end
- # Check for a silence by deprecation name, or by location.
+ # Check for a silence by deprecation name, or by location.
self.class.deprecation_key == silence_spec || self.class.deprecation_id.to_s == silence_spec || "chef-#{self.class.deprecation_id}" == silence_spec.downcase || location.include?(silence_spec)
end
# check if this warning has been silenced by inline comment.
diff --git a/lib/chef/dsl/platform_introspection.rb b/lib/chef/dsl/platform_introspection.rb
index e8fe616084..794f807f23 100644
--- a/lib/chef/dsl/platform_introspection.rb
+++ b/lib/chef/dsl/platform_introspection.rb
@@ -168,7 +168,7 @@ class Chef
has_platform
end
- # Implementation class for determining platform family dependent values
+ # Implementation class for determining platform family dependent values
class PlatformFamilyDependentValue
# Create a platform family dependent value object.
diff --git a/lib/chef/knife/bootstrap.rb b/lib/chef/knife/bootstrap.rb
index bb6c5871c6..f9c3b7bb81 100644
--- a/lib/chef/knife/bootstrap.rb
+++ b/lib/chef/knife/bootstrap.rb
@@ -93,12 +93,12 @@ class Chef
description: "For WinRM basic authentication when using the 'ssl' auth method.",
boolean: true
- # This option was provided in knife bootstrap windows winrm,
- # but it is ignored in knife-windows/WinrmSession, and so remains unimplemeneted here.
- # option :kerberos_keytab_file,
- # :short => "-T KEYTAB_FILE",
- # :long => "--keytab-file KEYTAB_FILE",
- # :description => "The Kerberos keytab file used for authentication"
+ # This option was provided in knife bootstrap windows winrm,
+ # but it is ignored in knife-windows/WinrmSession, and so remains unimplemeneted here.
+ # option :kerberos_keytab_file,
+ # :short => "-T KEYTAB_FILE",
+ # :long => "--keytab-file KEYTAB_FILE",
+ # :description => "The Kerberos keytab file used for authentication"
option :kerberos_realm,
short: "-R KERBEROS_REALM",
diff --git a/lib/chef/mixin/create_path.rb b/lib/chef/mixin/create_path.rb
index 6d6f66317e..26988556aa 100644
--- a/lib/chef/mixin/create_path.rb
+++ b/lib/chef/mixin/create_path.rb
@@ -53,14 +53,14 @@ class Chef
private
def create_dir(path)
- # When doing multithreaded downloads into the file cache, the following
- # interleaving raises an error here:
- #
- # thread1 thread2
- # File.directory?(create_path) <- false
- # File.directory?(create_path) <- false
- # Dir.mkdir(create_path)
- # Dir.mkdir(create_path) <- raises Errno::EEXIST
+ # When doing multithreaded downloads into the file cache, the following
+ # interleaving raises an error here:
+ #
+ # thread1 thread2
+ # File.directory?(create_path) <- false
+ # File.directory?(create_path) <- false
+ # Dir.mkdir(create_path)
+ # Dir.mkdir(create_path) <- raises Errno::EEXIST
Chef::Log.trace("Creating directory #{path}")
Dir.mkdir(path)
rescue Errno::EEXIST
diff --git a/lib/chef/node/mixin/deep_merge_cache.rb b/lib/chef/node/mixin/deep_merge_cache.rb
index 8cde5a400a..e88e079895 100644
--- a/lib/chef/node/mixin/deep_merge_cache.rb
+++ b/lib/chef/node/mixin/deep_merge_cache.rb
@@ -19,9 +19,9 @@ class Chef
class Node
module Mixin
module DeepMergeCache
- # Cache of deep merged values by top-level key. This is a simple hash which has keys that are the
- # top-level keys of the node object, and we save the computed deep-merge for that key here. There is
- # no cache of subtrees.
+ # Cache of deep merged values by top-level key. This is a simple hash which has keys that are the
+ # top-level keys of the node object, and we save the computed deep-merge for that key here. There is
+ # no cache of subtrees.
attr_accessor :deep_merge_cache
def initialize
@@ -31,10 +31,10 @@ class Chef
@deep_merge_cache = {}
end
- # Invalidate a key in the deep_merge_cache. If called with nil, or no arg, this will invalidate
- # the entire deep_merge cache. In the case of the user doing node.default['foo']['bar']['baz']=
- # that eventually results in a call to reset_cache('foo') here. A node.default=hash_thing call
- # must invalidate the entire cache and re-deep-merge the entire node object.
+ # Invalidate a key in the deep_merge_cache. If called with nil, or no arg, this will invalidate
+ # the entire deep_merge cache. In the case of the user doing node.default['foo']['bar']['baz']=
+ # that eventually results in a call to reset_cache('foo') here. A node.default=hash_thing call
+ # must invalidate the entire cache and re-deep-merge the entire node object.
def reset_cache(path = nil)
if path.nil?
deep_merge_cache.clear
diff --git a/lib/chef/provider/service/simple.rb b/lib/chef/provider/service/simple.rb
index 754437b4a0..0d1a9ae786 100644
--- a/lib/chef/provider/service/simple.rb
+++ b/lib/chef/provider/service/simple.rb
@@ -117,9 +117,9 @@ class Chef
logger.trace("#{@new_resource} is running")
end
rescue Mixlib::ShellOut::ShellCommandFailed, SystemCallError
- # ShellOut sometimes throws different types of Exceptions than ShellCommandFailed.
- # Temporarily catching different types of exceptions here until we get Shellout fixed.
- # TODO: Remove the line before one we get the ShellOut fix.
+ # ShellOut sometimes throws different types of Exceptions than ShellCommandFailed.
+ # Temporarily catching different types of exceptions here until we get Shellout fixed.
+ # TODO: Remove the line before one we get the ShellOut fix.
@status_load_success = false
@current_resource.running false
nil
diff --git a/lib/chef/provider/windows_task.rb b/lib/chef/provider/windows_task.rb
index 598e6f8e60..ff0d338b48 100644
--- a/lib/chef/provider/windows_task.rb
+++ b/lib/chef/provider/windows_task.rb
@@ -424,7 +424,7 @@ class Chef
when TaskScheduler::AT_LOGON
# TODO: handle option for this trigger
when TaskScheduler::AT_SYSTEMSTART
- # TODO: handle option for this trigger
+ # TODO: handle option for this trigger
end
end
diff --git a/lib/chef/resource/launchd.rb b/lib/chef/resource/launchd.rb
index e116f8c624..f71abd8557 100644
--- a/lib/chef/resource/launchd.rb
+++ b/lib/chef/resource/launchd.rb
@@ -76,20 +76,20 @@ class Chef
property :start_calendar_interval, [Hash, Array],
description: "A Hash (similar to crontab) that defines the calendar frequency at which a job is started or an Array.",
coerce: proc { |type|
- # Coerce into an array of hashes to make validation easier
+ # Coerce into an array of hashes to make validation easier
array = if type.is_a?(Array)
type
else
[type]
end
- # Check to make sure that our array only has hashes
+ # Check to make sure that our array only has hashes
unless array.all? { |obj| obj.is_a?(Hash) }
error_msg = "start_calendar_interval must be a single hash or an array of hashes!"
raise Chef::Exceptions::ValidationFailed, error_msg
end
- # Make sure the hashes don't have any incorrect keys/values
+ # Make sure the hashes don't have any incorrect keys/values
array.each do |entry|
allowed_keys = %w{Minute Hour Day Weekday Month}
unless entry.keys.all? { |key| allowed_keys.include?(key) }
@@ -105,7 +105,7 @@ class Chef
end
end
- # Don't return array if we only have one entry
+ # Don't return array if we only have one entry
if array.size == 1
array.first
else
diff --git a/lib/chef/resource/macos_userdefaults.rb b/lib/chef/resource/macos_userdefaults.rb
index acd783cade..a8158aba5e 100644
--- a/lib/chef/resource/macos_userdefaults.rb
+++ b/lib/chef/resource/macos_userdefaults.rb
@@ -62,9 +62,9 @@ class Chef
desired_state: false,
skip_docs: true
- # coerce various ways of representing a boolean into either 0 (false) or 1 (true)
- # which is what the defaults CLI expects. Why? Well defaults itself accepts a few
- # different formats, but when you do a read command it all comes back as 1 or 0.
+ # coerce various ways of representing a boolean into either 0 (false) or 1 (true)
+ # which is what the defaults CLI expects. Why? Well defaults itself accepts a few
+ # different formats, but when you do a read command it all comes back as 1 or 0.
def coerce_booleans(val)
return 1 if [true, "TRUE", "1", "true", "YES", "yes"].include?(val)
return 0 if [false, "FALSE", "0", "false", "NO", "no"].include?(val)
diff --git a/lib/chef/resource/windows_firewall_rule.rb b/lib/chef/resource/windows_firewall_rule.rb
index f7f22856d6..f1a039267d 100644
--- a/lib/chef/resource/windows_firewall_rule.rb
+++ b/lib/chef/resource/windows_firewall_rule.rb
@@ -93,7 +93,7 @@ class Chef
description: "The local address the firewall rule applies to."
property :local_port, [String, Integer, Array],
- # split various formats of comma separated lists and provide a sorted array of strings to match PS output
+ # split various formats of comma separated lists and provide a sorted array of strings to match PS output
coerce: proc { |d| d.is_a?(String) ? d.split(/\s*,\s*/).sort : Array(d).sort.map(&:to_s) },
description: "The local port the firewall rule applies to."
@@ -101,7 +101,7 @@ class Chef
description: "The remote address the firewall rule applies to."
property :remote_port, [String, Integer, Array],
- # split various formats of comma separated lists and provide a sorted array of strings to match PS output
+ # split various formats of comma separated lists and provide a sorted array of strings to match PS output
coerce: proc { |d| d.is_a?(String) ? d.split(/\s*,\s*/).sort : Array(d).sort.map(&:to_s) },
description: "The remote port the firewall rule applies to."
diff --git a/lib/chef/resource/windows_share.rb b/lib/chef/resource/windows_share.rb
index 1f8586836d..10533382f9 100644
--- a/lib/chef/resource/windows_share.rb
+++ b/lib/chef/resource/windows_share.rb
@@ -187,8 +187,8 @@ class Chef
[f_users, c_users, r_users]
end
-# local names are returned from Get-SmbShareAccess in the full format MACHINE\\NAME
-# but users of this resource would simply say NAME so we need to strip the values for comparison
+ # local names are returned from Get-SmbShareAccess in the full format MACHINE\\NAME
+ # but users of this resource would simply say NAME so we need to strip the values for comparison
def stripped_account(name)
name.slice!("#{node["hostname"]}\\")
name
diff --git a/lib/chef/resource/windows_task.rb b/lib/chef/resource/windows_task.rb
index bd53744f0a..5e2aa70c47 100644
--- a/lib/chef/resource/windows_task.rb
+++ b/lib/chef/resource/windows_task.rb
@@ -272,16 +272,16 @@ class Chef
private
- ## Resource is not idempotent when day, start_day is not provided with frequency :weekly
- ## we set start_day when not given by user as current date based on which we set the day property for current current date day is monday ..
- ## we set the monday as the day so at next run when new_resource.day is nil and current_resource day is monday due to which udpate gets called
+ ## Resource is not idempotent when day, start_day is not provided with frequency :weekly
+ ## we set start_day when not given by user as current date based on which we set the day property for current current date day is monday ..
+ ## we set the monday as the day so at next run when new_resource.day is nil and current_resource day is monday due to which udpate gets called
def idempotency_warning_for_frequency_weekly(day, start_day)
if start_day.nil? && day.nil?
logger.warn "To maintain idempotency for frequency :weekly provide start_day, start_time and day."
end
end
- # Validate the passed value is numeric values only if it is a string
+ # Validate the passed value is numeric values only if it is a string
def numeric_value_in_string?(val)
return true if Integer(val)
rescue ArgumentError
@@ -307,7 +307,7 @@ class Chef
end
end
- # returns true if frequency_modifer has values First, second, third, fourth, last, lastday
+ # returns true if frequency_modifer has values First, second, third, fourth, last, lastday
def frequency_modifier_includes_days_of_weeks?(frequency_modifier)
frequency_modifier = frequency_modifier.to_s.split(",")
frequency_modifier.map! { |value| value.strip.upcase }
@@ -322,7 +322,7 @@ class Chef
raise ArgumentError, "Invalid value passed for `random_delay`. Please pass seconds as an Integer (e.g. 60) or a String with numeric values only (e.g. '60')." unless numeric_value_in_string?(random_delay)
end
- # @todo when we drop ruby 2.3 support this should be converted to .match?() instead of =~f
+ # @todo when we drop ruby 2.3 support this should be converted to .match?() instead of =~f
def validate_start_day(start_day, frequency)
if start_day && frequency == :none
raise ArgumentError, "`start_day` property is not supported with frequency: #{frequency}"
@@ -334,7 +334,7 @@ class Chef
end
end
- # @todo when we drop ruby 2.3 support this should be converted to .match?() instead of =~
+ # @todo when we drop ruby 2.3 support this should be converted to .match?() instead of =~
def validate_start_time(start_time, frequency)
if start_time
raise ArgumentError, "`start_time` property is not supported with `frequency :none`" if frequency == :none
@@ -434,7 +434,7 @@ class Chef
end
end
- # This method returns true if day has values from 1-31 which is a days of moths and used with frequency :monthly
+ # This method returns true if day has values from 1-31 which is a days of moths and used with frequency :monthly
def days_includes_days_of_months?(days)
days.map! { |day| day.to_s.strip.downcase }
(days - VALID_DAYS_OF_MONTH).empty?
@@ -452,11 +452,11 @@ class Chef
end
end
- # Converts the number of seconds to an ISO8601 duration format and returns it.
- # Ref : https://github.com/arnau/ISO8601/blob/master/lib/iso8601/duration.rb#L18-L23
- # e.g.
- # ISO8601::Duration.new(65707200).to_s
- # returns 'PT65707200S'
+ # Converts the number of seconds to an ISO8601 duration format and returns it.
+ # Ref : https://github.com/arnau/ISO8601/blob/master/lib/iso8601/duration.rb#L18-L23
+ # e.g.
+ # ISO8601::Duration.new(65707200).to_s
+ # returns 'PT65707200S'
def sec_to_dur(seconds)
ISO8601::Duration.new(seconds.to_i).to_s
end
diff --git a/lib/chef/util/dsc/lcm_output_parser.rb b/lib/chef/util/dsc/lcm_output_parser.rb
index 2c052396e1..38c202a4bb 100644
--- a/lib/chef/util/dsc/lcm_output_parser.rb
+++ b/lib/chef/util/dsc/lcm_output_parser.rb
@@ -160,9 +160,9 @@ class Chef
def self.parse_line(line)
if match = line.match(/^.*?:.*?:\s*LCM:\s*\[(.*?)\](.*)/)
- # If the line looks like
- # What If: [machinename]: LCM: [op_action op_type] message
- # extract op_action, op_type, and message
+ # If the line looks like
+ # What If: [machinename]: LCM: [op_action op_type] message
+ # extract op_action, op_type, and message
operation, info = match.captures
op_action, op_type = operation.strip.split(" ").map { |m| m.downcase.to_sym }
else
diff --git a/lib/chef/win32/api/file.rb b/lib/chef/win32/api/file.rb
index 7aca1068e0..11a18e26d1 100644
--- a/lib/chef/win32/api/file.rb
+++ b/lib/chef/win32/api/file.rb
@@ -461,22 +461,22 @@ BOOL WINAPI DeviceIoControl(
=end
safe_attach_function :DeviceIoControl, %i{HANDLE DWORD LPVOID DWORD LPVOID DWORD LPDWORD pointer}, :BOOL
-# BOOL WINAPI DeleteVolumeMountPoint(
- # _In_ LPCTSTR lpszVolumeMountPoint
-# );
+ # BOOL WINAPI DeleteVolumeMountPoint(
+ # _In_ LPCTSTR lpszVolumeMountPoint
+ # );
safe_attach_function :DeleteVolumeMountPointW, [:LPCTSTR], :BOOL
-# BOOL WINAPI SetVolumeMountPoint(
- # _In_ LPCTSTR lpszVolumeMountPoint,
- # _In_ LPCTSTR lpszVolumeName
-# );
+ # BOOL WINAPI SetVolumeMountPoint(
+ # _In_ LPCTSTR lpszVolumeMountPoint,
+ # _In_ LPCTSTR lpszVolumeName
+ # );
safe_attach_function :SetVolumeMountPointW, %i{LPCTSTR LPCTSTR}, :BOOL
-# BOOL WINAPI GetVolumeNameForVolumeMountPoint(
- # _In_ LPCTSTR lpszVolumeMountPoint,
- # _Out_ LPTSTR lpszVolumeName,
- # _In_ DWORD cchBufferLength
-# );
+ # BOOL WINAPI GetVolumeNameForVolumeMountPoint(
+ # _In_ LPCTSTR lpszVolumeMountPoint,
+ # _Out_ LPTSTR lpszVolumeName,
+ # _In_ DWORD cchBufferLength
+ # );
safe_attach_function :GetVolumeNameForVolumeMountPointW, %i{LPCTSTR LPTSTR DWORD}, :BOOL
=begin
@@ -538,12 +538,12 @@ BOOL WINAPI VerQueryValue(
# ensures the handle is closed on exit of the block
# FIXME: yard with @yield
def file_search_handle(path)
- # Workaround for CHEF-4419:
- # Make sure paths starting with "/" has a drive letter
- # assigned from the current working diretory.
- # Note: With CHEF-4427 this issue will be fixed with a
- # broader fix to map all the paths starting with "/" to
- # SYSTEM_DRIVE on windows.
+ # Workaround for CHEF-4419:
+ # Make sure paths starting with "/" has a drive letter
+ # assigned from the current working diretory.
+ # Note: With CHEF-4427 this issue will be fixed with a
+ # broader fix to map all the paths starting with "/" to
+ # SYSTEM_DRIVE on windows.
path = ::File.expand_path(path) if path.start_with? "/"
path = canonical_encode_path(path)
find_data = WIN32_FIND_DATA.new
diff --git a/lib/chef/win32/process.rb b/lib/chef/win32/process.rb
index fa3286108c..17621f8518 100644
--- a/lib/chef/win32/process.rb
+++ b/lib/chef/win32/process.rb
@@ -82,8 +82,8 @@ class Chef
(call_succeeded != 0) && (is_64_bit_process_result.get_int(0) != 0)
end
- # Must have PROCESS_QUERY_INFORMATION or PROCESS_QUERY_LIMITED_INFORMATION rights,
- # AND the PROCESS_VM_READ right
+ # Must have PROCESS_QUERY_INFORMATION or PROCESS_QUERY_LIMITED_INFORMATION rights,
+ # AND the PROCESS_VM_READ right
def self.get_process_memory_info(handle)
memory_info = PROCESS_MEMORY_COUNTERS.new
unless GetProcessMemoryInfo(handle.handle, memory_info, memory_info.size)