diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/chef/dsl/platform_introspection.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/dsl/platform_introspection.rb b/lib/chef/dsl/platform_introspection.rb index a0c2d33967..f99ab970c5 100644 --- a/lib/chef/dsl/platform_introspection.rb +++ b/lib/chef/dsl/platform_introspection.rb @@ -257,8 +257,8 @@ class Chef def docker?(node = run_context.nil? ? nil : run_context.node) # Using "File.exist?('/.dockerinit') || File.exist?('/.dockerenv')" makes Travis sad, # and that makes us sad too. - node && node[:virtualization] && node[:virtualization][:systems] && - node[:virtualization][:systems][:docker] && node[:virtualization][:systems][:docker] == "guest" + !!(node && node[:virtualization] && node[:virtualization][:systems] && + node[:virtualization][:systems][:docker] && node[:virtualization][:systems][:docker] == "guest") end end |