summaryrefslogtreecommitdiff
path: root/lib/chef/mixin/which.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/mixin/which.rb')
-rw-r--r--lib/chef/mixin/which.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/chef/mixin/which.rb b/lib/chef/mixin/which.rb
index a51963b6c2..87946038ef 100644
--- a/lib/chef/mixin/which.rb
+++ b/lib/chef/mixin/which.rb
@@ -28,12 +28,12 @@ class Chef
# NOTE: unnecessarily duplicates function of path_sanity
extra_path ||= [ "/bin", "/usr/bin", "/sbin", "/usr/sbin" ]
paths = env_path.split(File::PATH_SEPARATOR) + Array(extra_path)
- cmds.map do |cmd|
- paths.map do |path|
+ cmds.map { |cmd|
+ paths.map { |path|
filename = Chef.path_to(File.join(path, cmd))
filename if valid_executable?(filename, &block)
- end.compact
- end.flatten
+ }.compact
+ }.flatten
end
private