summaryrefslogtreecommitdiff
path: root/lib/chef/resource/file.rb
diff options
context:
space:
mode:
authorAndrew Brown <andrew.brown@shopify.com>2016-05-30 13:22:14 -0400
committerAndrew Brown <andrew.brown@shopify.com>2016-05-30 16:14:34 -0400
commit61d1831a9eabd44af6797d49b85ff1c01b71055d (patch)
treefbbd43e642760a8756912c6904197f5edb25c2bd /lib/chef/resource/file.rb
parent75ace978d070f2f8923f40c328ea594cd505cafb (diff)
downloadchef-61d1831a9eabd44af6797d49b85ff1c01b71055d.tar.gz
Switch to node attributes for docker detection
Using ::File.exists? makes Travis CI sad due to statically looking for files. We'll use node attributes provided by Ohai instead.
Diffstat (limited to 'lib/chef/resource/file.rb')
-rw-r--r--lib/chef/resource/file.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/resource/file.rb b/lib/chef/resource/file.rb
index b8c7bb73e9..71a8e946fd 100644
--- a/lib/chef/resource/file.rb
+++ b/lib/chef/resource/file.rb
@@ -50,7 +50,7 @@ class Chef
allowed_actions :create, :delete, :touch, :create_if_missing
property :path, String, name_property: true, identity: true
- property :atomic_update, [ true, false ], desired_state: false, default: lazy { |r| r.docker?(r.node) && r.special_docker_files?(r.path) ? false : Chef::Config[:file_atomic_update] }
+ property :atomic_update, [ true, false ], desired_state: false, default: lazy { |r| r.docker? && r.special_docker_files?(r.path) ? false : Chef::Config[:file_atomic_update] }
property :backup, [ Integer, false ], desired_state: false, default: 5
property :checksum, [ /^[a-zA-Z0-9]{64}$/, nil ]
property :content, [ String, nil ], desired_state: false