Skip to content

Commit 38d6f10

Browse files
committed
fix
1 parent bfd78a1 commit 38d6f10

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

lib/puppet/provider/package/openbsd.rb

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,14 @@ def self.instances
4040
process.each_line { |line|
4141
match = regex.match(line.split[0])
4242
next unless match
43-
fields.zip(match.captures) { |field, value|
44-
hash[field] = value
45-
}
43+
fields.zip(match.captures) { |field, value|
44+
hash[field] = value
45+
}
4646

47-
hash[:provider] = name
47+
hash[:provider] = name
4848

49-
packages << new(hash)
50-
hash = {}
51-
end
49+
packages << new(hash)
50+
hash = {}
5251
}
5352
end
5453

@@ -181,12 +180,11 @@ def get_version
181180
matching_pkgs = pkginfo("-I", "pkg_search_name")
182181
matching_pkgs.each_line do |line|
183182
next unless (match = regex.match(line.split[0]))
184-
# now we return the first version, unless ensure is latest
185-
version = match.captures[1]
186-
return version unless @resource[:ensure] == "latest"
183+
# now we return the first version, unless ensure is latest
184+
version = match.captures[1]
185+
return version unless @resource[:ensure] == "latest"
187186

188-
master_version = version unless master_version > version
189-
end
187+
master_version = version unless master_version > version
190188
end
191189

192190
return master_version unless master_version == 0

0 commit comments

Comments
 (0)