From 31796796fba18a038e2492e74e4d62643d751f43 Mon Sep 17 00:00:00 2001 From: Jared Quick Date: Mon, 30 Oct 2017 10:23:25 -0400 Subject: [PATCH] add skip empty line on os_release detect Signed-off-by: Jared Quick --- lib/train/platforms/detect/os_linux.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/train/platforms/detect/os_linux.rb b/lib/train/platforms/detect/os_linux.rb index 467e91ac..dec83188 100644 --- a/lib/train/platforms/detect/os_linux.rb +++ b/lib/train/platforms/detect/os_linux.rb @@ -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