From 3a91f8cf69dc6ba643f8d06f9d3aa61bd69d6b8a Mon Sep 17 00:00:00 2001 From: Lavinia Foldenyi Date: Fri, 21 Sep 2018 16:45:50 +0300 Subject: (MODULES-7814) Ignore nil values when parsing commands. Fix for: Could not evaluate: undefined method strip! for nil:NilClass --- lib/puppet/provider/augeas/augeas.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/puppet') diff --git a/lib/puppet/provider/augeas/augeas.rb b/lib/puppet/provider/augeas/augeas.rb index a22a506..7704955 100644 --- a/lib/puppet/provider/augeas/augeas.rb +++ b/lib/puppet/provider/augeas/augeas.rb @@ -79,8 +79,9 @@ Puppet::Type.type(:augeas).provide(:augeas) do data = data.flatten args = [] data.each do |line| + next if line.nil? line.strip! - next if line.nil? || line.empty? + next if line.empty? argline = [] sc = StringScanner.new(line) cmd = sc.scan(%r{\w+|==|!=}) -- cgit v1.2.3