Skip to content

Commit

Permalink
add skip empty line on os_release detect
Browse files Browse the repository at this point in the history
Signed-off-by: Jared Quick <jquick@chef.io>
  • Loading branch information
jquick committed Oct 30, 2017
1 parent 810b3d6 commit 3179679
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/train/platforms/detect/os_linux.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ def parse_os_release_info(raw)

raw.lines.each_with_object({}) do |line, memo|
line.strip!
next if line.empty?
key, value = line.split('=', 2)
memo[key] = value.gsub(/\A"|"\Z/, '') unless value.empty?
end
Expand Down

0 comments on commit 3179679

Please sign in to comment.