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
40
40
process . each_line { |line |
41
41
match = regex . match ( line . split [ 0 ] )
42
42
next unless match
43
+
43
44
fields . zip ( match . captures ) { |field , value |
44
45
hash [ field ] = value
45
46
}
@@ -180,6 +181,7 @@ def get_version
180
181
matching_pkgs = pkginfo ( "-I" , "pkg_search_name" )
181
182
matching_pkgs . each_line do |line |
182
183
next unless ( match = regex . match ( line . split [ 0 ] ) )
184
+
183
185
# now we return the first version, unless ensure is latest
184
186
version = match . captures [ 1 ]
185
187
return version unless @resource [ :ensure ] == "latest"
@@ -192,7 +194,6 @@ def get_version
192
194
return '' if version == -1
193
195
194
196
raise Puppet ::Error , _ ( "%{version} is not available for this package" ) % { version : version }
195
-
196
197
rescue Puppet ::ExecutionFailure
197
198
nil
198
199
end
You can’t perform that action at this time.
0 commit comments