From: Ben Ford Date: Fri, 10 Feb 2017 00:28:45 +0000 (-0800) Subject: This class should be private X-Git-Tag: 4.4.1~18^2~2 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=1b815ebb37b275041f5b0ec1ae186791d084e362;p=puppet-modules%2Fpuppetlabs-apt.git This class should be private Provides a more useful error message when users try to use this class by itself. Without this fix, you'll get something like ``` Error: Evaluation Error: Operator '[]' is not applicable to an Undef Value. at /etc/puppetlabs/code/environments/production/modules/apt/manifests/update.pp:7:8"? ``` --- diff --git a/manifests/update.pp b/manifests/update.pp index 4a8a7c8..5162520 100644 --- a/manifests/update.pp +++ b/manifests/update.pp @@ -1,4 +1,6 @@ class apt::update { + assert_private + #TODO: to catch if $::apt_update_last_success has the value of -1 here. If we #opt to do this, a info/warn would likely be all you'd need likely to happen #on the first run, but if it's not run in awhile something is likely borked