File tree Expand file tree Collapse file tree 1 file changed +10
-12
lines changed
lib/puppet/provider/package Expand file tree Collapse file tree 1 file changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -40,15 +40,14 @@ def self.instances
40
40
process . each_line { |line |
41
41
match = regex . match ( line . split [ 0 ] )
42
42
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
+ }
46
46
47
- hash [ :provider ] = name
47
+ hash [ :provider ] = name
48
48
49
- packages << new ( hash )
50
- hash = { }
51
- end
49
+ packages << new ( hash )
50
+ hash = { }
52
51
}
53
52
end
54
53
@@ -181,12 +180,11 @@ def get_version
181
180
matching_pkgs = pkginfo ( "-I" , "pkg_search_name" )
182
181
matching_pkgs . each_line do |line |
183
182
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"
187
186
188
- master_version = version unless master_version > version
189
- end
187
+ master_version = version unless master_version > version
190
188
end
191
189
192
190
return master_version unless master_version == 0
You can’t perform that action at this time.
0 commit comments