diff options
author | Vasu1105 <vasundhara.jagdale@msystechnologies.com> | 2017-12-07 09:02:01 +0000 |
---|---|---|
committer | Vasu1105 <vasundhara.jagdale@msystechnologies.com> | 2017-12-26 08:38:42 +0000 |
commit | 4da3e139ccce5ca9813ec2900109cf3cee3b130d (patch) | |
tree | e72b29dd18150d58c1773ff4fccd10fc0377cbd0 /lib/chef/resource/execute.rb | |
parent | bfe8487a26f99d3cd3e08fffea8cf6457631cf69 (diff) | |
download | chef-4da3e139ccce5ca9813ec2900109cf3cee3b130d.tar.gz |
[MSYS-725] [chef#6073] allow forcing senistive to false on execute and batch resource
Signed-off-by: Vasu1105 <vasundhara.jagdale@msystechnologies.com>
Diffstat (limited to 'lib/chef/resource/execute.rb')
-rw-r--r-- | lib/chef/resource/execute.rb | 3 |
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 |