summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/mixlib/shellout.rb4
-rw-r--r--lib/mixlib/shellout/helper.rb2
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/mixlib/shellout.rb b/lib/mixlib/shellout.rb
index 2b998ab..dc186a2 100644
--- a/lib/mixlib/shellout.rb
+++ b/lib/mixlib/shellout.rb
@@ -16,8 +16,8 @@
# limitations under the License.
#
-require "etc"
-require "tmpdir"
+require "etc" unless defined?(Etc)
+require "tmpdir" unless defined?(Dir.mktmpdir)
require "fcntl"
require_relative "shellout/exceptions"
diff --git a/lib/mixlib/shellout/helper.rb b/lib/mixlib/shellout/helper.rb
index ac63494..4543cf1 100644
--- a/lib/mixlib/shellout/helper.rb
+++ b/lib/mixlib/shellout/helper.rb
@@ -16,7 +16,7 @@
# limitations under the License.
require_relative "../shellout"
-require "chef-utils"
+require "chef-utils" unless defined?(ChefUtils)
require "chef-utils/dsl/default_paths"
require "chef-utils/internal"