Skip to content

Commit a10eac2

Browse files
committed
mostly done
1 parent 38d6f10 commit a10eac2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/puppet/provider/package/openbsd.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)