summaryrefslogtreecommitdiff
path: root/lib
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 19:28:26 -0800
commit3c9b26a9fb7da5b2f4ef816adecd86fca0a00b8d (patch)
tree3a6b4342ed9f07baae5410e51613653a65712200 /lib
parentc2436c5902694b4855219d419e93a37edbc922c6 (diff)
downloadchef-3c9b26a9fb7da5b2f4ef816adecd86fca0a00b8d.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>
Diffstat (limited to 'lib')
-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