summaryrefslogtreecommitdiff
path: root/lib/chef/resource/execute.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/resource/execute.rb')
-rw-r--r--lib/chef/resource/execute.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/chef/resource/execute.rb b/lib/chef/resource/execute.rb
index de927ec06e..616195deee 100644
--- a/lib/chef/resource/execute.rb
+++ b/lib/chef/resource/execute.rb
@@ -133,7 +133,8 @@ class Chef
property :password, String, sensitive: true
- property :sensitive, [ TrueClass, FalseClass ], default: false, coerce: proc { |x| password ? true : x }
+ # lazy used to set default value of sensitive to true if password is set
+ property :sensitive, [ TrueClass, FalseClass ], default: lazy { |r| r.password ? true : false }
property :elevated, [ TrueClass, FalseClass ], default: false