summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2018-11-27 15:09:34 -0800
committerTim Smith <tsmith@chef.io>2018-11-27 15:12:24 -0800
commit60fc7dccec701f9bc8db7132a597c4f66423d461 (patch)
tree4dd19dbd1123e4973b1426f4a2d6dcf9c4445944
parentfb37f4e97dcd857d85ce21f069480d4595ba8f93 (diff)
downloadchef-60fc7dccec701f9bc8db7132a597c4f66423d461.tar.gz
Make sure which mixin requires chef_class
It uses path_to which is in chef_class Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--lib/chef/mixin/which.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/chef/mixin/which.rb b/lib/chef/mixin/which.rb
index 8a825f55c9..ffa324c911 100644
--- a/lib/chef/mixin/which.rb
+++ b/lib/chef/mixin/which.rb
@@ -1,6 +1,6 @@
#--
# Author:: Lamont Granquist <lamont@chef.io>
-# Copyright:: Copyright 2010-2017, Chef Software Inc.
+# Copyright:: Copyright 2010-2018, Chef Software Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -18,6 +18,8 @@
class Chef
module Mixin
module Which
+ require "chef/chef_class"
+
def which(*cmds, extra_path: nil, &block)
where(*cmds, extra_path: extra_path, &block).first || false
end