Skip to content

Commit

Permalink
fix get ubuntu version
Browse files Browse the repository at this point in the history
  • Loading branch information
wanyaoqi committed Sep 7, 2020
1 parent 74b3bf2 commit d226769
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/hostman/guestfs/fsdriver/linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit d226769

Please sign in to comment.