summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2018-11-27 20:49:41 -0800
committerGitHub <noreply@github.com>2018-11-27 20:49:41 -0800
commit9bb475f4a36615403ac11157d8c217443ab44b4b (patch)
treecbb90a2b3b2a5a5f781b11043fb6b3227a533cac
parentcd665c2eddd7878e3e78bd2fc489677decc46d34 (diff)
parent3c9b26a9fb7da5b2f4ef816adecd86fca0a00b8d (diff)
downloadchef-9bb475f4a36615403ac11157d8c217443ab44b4b.tar.gz
Merge pull request #7995 from chef/which_14
Make sure which mixin requires chef_class
-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