summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDavid Schmitt <david@black.co.at>2016-10-08 18:28:22 +0100
committerDavid Schmitt <david@black.co.at>2016-10-09 22:03:32 +0100
commitbec521e6b79dd612a73e742d1cb6371e17ade1a9 (patch)
treeae483c1f2c14cbf5919e4e0679057677cc02003e /lib
parente44238a9c7da7ad4a872ba86cd103becadd51b3b (diff)
Update deprecation() so warnings can be disabled for CI
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/functions/deprecation.rb4
1 files changed, 3 insertions, 1 deletions
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