Skip to content

Commit 1762f38

Browse files
committed
Made handle and handlers mutually exclusive
1 parent 28cf564 commit 1762f38

File tree

1 file changed

+3
-0
lines changed
  • lib/puppet/provider/sensu_check

1 file changed

+3
-0
lines changed

lib/puppet/provider/sensu_check/json.rb

+3
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,9 @@ def handle
200200

201201
def handle=(value)
202202
case value
203+
when true, 'true', 'True', :true, 1 && resource[:handlers]
204+
Puppet.notice("Do not use 'handle' and 'handlers' together. Your 'handle' value has been overridden with 'handlers'")
205+
next
203206
when true, 'true', 'True', :true, 1
204207
conf['checks'][resource[:name]]['handle'] = true
205208
when false, 'false', 'False', :false, 0

0 commit comments

Comments
 (0)