From 1b815ebb37b275041f5b0ec1ae186791d084e362 Mon Sep 17 00:00:00 2001 From: Ben Ford Date: Thu, 9 Feb 2017 16:28:45 -0800 Subject: [PATCH] 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"? ``` --- manifests/update.pp | 2 ++ 1 file changed, 2 insertions(+) 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 -- 2.32.3