Skip to content

Commit 26bde63

Browse files
author
jordanbreen28
committed
(maint) - fix rubocop
1 parent 8e78b5f commit 26bde63

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/facter/lvm_support.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,7 @@
3535
setcode do
3636
pvs = Facter::Core::Execution.execute("vgs -o pv_name #{vg} 2>/dev/null", timeout: 30)
3737
res = nil
38-
unless pvs.nil?
39-
res = pvs.split("\n").select { |l| l =~ %r{^\s+/} }.map(&:strip).sort.join(',')
40-
end
38+
res = pvs.split("\n").grep(%r{^\s+/}).map(&:strip).sort.join(',') unless pvs.nil?
4139
res
4240
end
4341
end

0 commit comments

Comments
 (0)