File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
lib/puppet/provider/package Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ def self.instances
4040 process . each_line { |line |
4141 match = regex . match ( line . split [ 0 ] )
4242 next unless match
43+
4344 fields . zip ( match . captures ) { |field , value |
4445 hash [ field ] = value
4546 }
@@ -180,6 +181,7 @@ def get_version
180181 matching_pkgs = pkginfo ( "-I" , "pkg_search_name" )
181182 matching_pkgs . each_line do |line |
182183 next unless ( match = regex . match ( line . split [ 0 ] ) )
184+
183185 # now we return the first version, unless ensure is latest
184186 version = match . captures [ 1 ]
185187 return version unless @resource [ :ensure ] == "latest"
@@ -192,7 +194,6 @@ def get_version
192194 return '' if version == -1
193195
194196 raise Puppet ::Error , _ ( "%{version} is not available for this package" ) % { version : version }
195-
196197 rescue Puppet ::ExecutionFailure
197198 nil
198199 end
You can’t perform that action at this time.
0 commit comments