mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-19 10:46:58 +08:00
Merge pull request #7792 from wanyaoqi/automated-cherry-pick-of-#7789-upstream-release-3.2
Automated cherry pick of #7789: fix get ubuntu version
This commit is contained in:
@@ -764,7 +764,7 @@ func (d *SUbuntuRootFs) GetReleaseInfo(rootFs IDiskPartition) *deployapi.Release
|
||||
lines := strings.Split(string(rel), "\n")
|
||||
for _, l := range lines {
|
||||
if strings.HasPrefix(l, distroKey) {
|
||||
version = strings.TrimSpace(l[len(distroKey) : len(l)-1])
|
||||
version = strings.TrimSpace(l[len(distroKey):])
|
||||
}
|
||||
}
|
||||
return deployapi.NewReleaseInfo(d.GetName(), version, d.GetArch(rootFs))
|
||||
|
||||
Reference in New Issue
Block a user