From 3af6e1ffe781405a7ff9915ff37754cba707e680 Mon Sep 17 00:00:00 2001 From: Lomanic Date: Fri, 31 May 2019 18:04:45 +0200 Subject: [PATCH] [host][linux] Properly handle double quotes in /etc/os-release in PlatformInformation --- host/host_linux.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/host/host_linux.go b/host/host_linux.go index 8eab651..89af40d 100644 --- a/host/host_linux.go +++ b/host/host_linux.go @@ -247,9 +247,9 @@ func getOSRelease() (platform string, version string, err error) { } switch field[0] { case "ID": // use ID for lowercase - platform = field[1] + platform = strings.Trim(field[1], `"`) case "VERSION": - version = field[1] + version = strings.Trim(field[1], `"`) } } return platform, version, nil