From bec521e6b79dd612a73e742d1cb6371e17ade1a9 Mon Sep 17 00:00:00 2001 From: David Schmitt Date: Sat, 8 Oct 2016 18:28:22 +0100 Subject: Update deprecation() so warnings can be disabled for CI --- lib/puppet/functions/deprecation.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/puppet/functions/deprecation.rb b/lib/puppet/functions/deprecation.rb index 6b7b977..a860aa2 100644 --- a/lib/puppet/functions/deprecation.rb +++ b/lib/puppet/functions/deprecation.rb @@ -15,7 +15,9 @@ Puppet::Functions.create_function(:deprecation) do when :error fail("deprecation. #{key}. #{message}") else - Puppet.deprecation_warning(message, key) + unless ENV['STDLIB_LOG_DEPRECATIONS'] == 'false' + Puppet.deprecation_warning(message, key) + end end end end -- cgit v1.2.3