mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
fix get ubuntu version
This commit is contained in:
@@ -773,7 +773,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