mirror of
https://github.com/containers/podman.git
synced 2025-08-06 11:32:07 +08:00
Remove any quotes around distribution id
Some distributions add extra quotes, even to fields like ID that doesn't really need them. Make sure to remove them too. Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
This commit is contained in:
@ -287,7 +287,7 @@ func (r *Runtime) GetHostDistributionInfo() define.DistributionInfo {
|
||||
l := bufio.NewScanner(f)
|
||||
for l.Scan() {
|
||||
if strings.HasPrefix(l.Text(), "ID=") {
|
||||
dist.Distribution = strings.TrimPrefix(l.Text(), "ID=")
|
||||
dist.Distribution = strings.Trim(strings.TrimPrefix(l.Text(), "ID="), "\"")
|
||||
}
|
||||
if strings.HasPrefix(l.Text(), "VARIANT_ID=") {
|
||||
dist.Variant = strings.Trim(strings.TrimPrefix(l.Text(), "VARIANT_ID="), "\"")
|
||||
|
Reference in New Issue
Block a user