[host][linux] Properly handle double quotes in /etc/os-release in PlatformInformation

This commit is contained in:
Lomanic 2019-05-31 18:04:45 +02:00
parent a0019d431c
commit 3af6e1ffe7
1 changed files with 2 additions and 2 deletions

View File

@ -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